From d1c53a4dfb4572ae2fc226d39919758d15a51eae Mon Sep 17 00:00:00 2001 From: Christian Frenzl Date: Sun, 20 Feb 2022 23:28:16 +0100 Subject: [PATCH] ci: run semantic-release dry-run on all branches but main, alpha + beta --- .github/workflows/semantic-release-dry.yml | 37 ++++++++++++++++++++++ .github/workflows/semantic-release.yml | 7 ++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/semantic-release-dry.yml diff --git a/.github/workflows/semantic-release-dry.yml b/.github/workflows/semantic-release-dry.yml new file mode 100644 index 0000000..26a514f --- /dev/null +++ b/.github/workflows/semantic-release-dry.yml @@ -0,0 +1,37 @@ +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push events for the main, alpha + beta branch + push: + branches-ignore: + - main + - alpha + - beta + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "release" + release: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: install dependencies + run: yarn + + - name: run unit tests + run: yarn test + + - name: execute semantic-release + run: yarn semantic-release --dry-run + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 8240057..fadca5e 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -4,7 +4,10 @@ name: CI on: # Triggers the workflow on push events for the main, alpha + beta branch push: - branches: [main, alpha, beta] + branches: + - main + - alpha + - beta # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -28,7 +31,7 @@ jobs: run: yarn test - name: execute semantic-release - run: npx semantic-release + run: yarn semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}