Merge pull request #3 from ronati/test-workflow #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SemVer Release | |
on: | |
push: | |
branches: | |
- main | |
- beta | |
permissions: | |
contents: read # for checkout | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
pull-requests: write # to be able to comment on released pull requests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
# TODO: Run Go/Terraform tests to make sure we publish a working version | |
# - name: Test | |
# run: | |
- name: Install dependencies | |
run: npm i -D @semantic-release/git @semantic-release/changelog @commitlint/{cli,config-conventional} commitlint | |
- name: Check commit format | |
# Checks commit from latest tag on this branch | |
# run: npx commitlint --from $(git describe --tags) --to HEAD --verbose | |
# TODO: replace this line with the one above once we published our first semver tag | |
run: npx commitlint --from 3a7bc32 --to HEAD --verbose | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npx semantic-release --dry-run |