Merge pull request #7 from dragonrealms-phoenix/develop #7
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: Release | |
on: | |
# Allow developers to run this on-demand. | |
workflow_dispatch: | |
# When merge to main branch then publish a release. | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read # for checkout | |
env: | |
HUSKY: 0 # don't run husky hooks like commit-lint | |
jobs: | |
build: | |
name: Build | |
uses: ./.github/workflows/build.yml | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: build | |
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 | |
id-token: write # to enable use of OIDC for npm provenance | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: yarn | |
cache-dependency-path: yarn.lock | |
- name: Install dependencies | |
run: yarn install | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: dist | |
- name: List artifacts | |
run: ls -R | |
working-directory: dist | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: yarn semantic-release |