From 2296cad189556d7a72fa5419f40c13475c57db60 Mon Sep 17 00:00:00 2001 From: Bouke Versteegh Date: Sun, 20 Mar 2022 13:38:25 +0100 Subject: [PATCH 1/6] Try out semantic-release --- .github/workflows/release.yml | 20 ++++++++++++++++++++ release.config.js | 11 +++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 release.config.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..af42863 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Release +on: + push: + branches: + - master + - feature/semantic-release +jobs: + release: + name: Release + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 16 + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release --dry-run \ No newline at end of file diff --git a/release.config.js b/release.config.js new file mode 100644 index 0000000..5d5115c --- /dev/null +++ b/release.config.js @@ -0,0 +1,11 @@ +module.exports = { + branches: ['main'], + plugins: [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github", + '@semantic-release/changelog', + '@semantic-release/github', + '@semantic-release/git', + ], +}; From 227c9f43cabed3539fe7451bf33cc478466c77d7 Mon Sep 17 00:00:00 2001 From: Bouke Versteegh Date: Sun, 20 Mar 2022 13:39:58 +0100 Subject: [PATCH 2/6] Limit tests to pull requests to master --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 31ce5b4..8a4f096 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,8 @@ name: Compile and Test -on: [push] - +on: + pull_request: + branches: + - master jobs: ShellTest: strategy: From c56fa4f29c633be57b19722230ab834add3dd57d Mon Sep 17 00:00:00 2001 From: Bouke Versteegh Date: Sun, 20 Mar 2022 13:40:50 +0100 Subject: [PATCH 3/6] Remove test dependency --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af42863..4434411 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,6 @@ jobs: release: name: Release runs-on: ubuntu-latest - needs: test steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 From b8948575401b16f9e88759f3be2d30ecfc9ab69e Mon Sep 17 00:00:00 2001 From: Bouke Versteegh Date: Sun, 20 Mar 2022 13:44:56 +0100 Subject: [PATCH 4/6] Explicit dependencies for semantic-release --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4434411..6709c36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,4 +16,4 @@ jobs: - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npx semantic-release --dry-run \ No newline at end of file + run: npx -p @semantic-release/changelog -p @semantic-release/git -p semantic-release semantic-release --dry-run \ No newline at end of file From 199fbf95ae6bda5d012a25b76a42a32c86d8a36e Mon Sep 17 00:00:00 2001 From: Bouke Versteegh Date: Sun, 20 Mar 2022 13:45:59 +0100 Subject: [PATCH 5/6] Release branch is master --- release.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.config.js b/release.config.js index 5d5115c..9beddcc 100644 --- a/release.config.js +++ b/release.config.js @@ -1,5 +1,5 @@ module.exports = { - branches: ['main'], + branches: ['master'], plugins: [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", From 36feeff24579b012f2e8723ee0b3210f5b033b81 Mon Sep 17 00:00:00 2001 From: Bouke Versteegh Date: Sun, 20 Mar 2022 13:47:07 +0100 Subject: [PATCH 6/6] Test releasing with feature branch --- release.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.config.js b/release.config.js index 9beddcc..3eed07c 100644 --- a/release.config.js +++ b/release.config.js @@ -1,5 +1,5 @@ module.exports = { - branches: ['master'], + branches: ['master', 'feature/semantic-release'], plugins: [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator",