Skip to content

Commit

Permalink
ci: dry-run relase for non-master branches
Browse files Browse the repository at this point in the history
  • Loading branch information
balazs4 committed Dec 4, 2021
1 parent 4f02953 commit 57765fd
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,23 @@ jobs:
env:
CI: true
ALOLA_REPORT: text
ALOLA_REPORT_ONLY: 1
ALOLA_REPORT_ONLY: true

release:
if: github.ref == 'refs/heads/master'
needs: [test, e2e]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cycjimmy/semantic-release-action@v2
- uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: npx semantic-release
run: |
GIT_BRANCH=`echo ${{ github.ref }} | cut -d"/" -f3`
case "${GIT_BRANCH}" in
'master') npx semantic-release --branches "$GIT_BRANCH" ;;
*) npx semantic-release --branches "$GIT_BRANCH" --dry-run ;;
esac
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 57765fd

Please sign in to comment.