Test Release (do a dry run) #3
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: Test Release (do a dry run) | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: ghcr.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: ${{ github.repository }} | |
on: | |
workflow_dispatch: # releasing is manual as we don't want to release every time | |
permissions: | |
contents: write | |
issues: read | |
pull-requests: read | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Only on main | |
if: github.ref != 'refs/heads/main' | |
shell: bash | |
run: | | |
echo "Only to be executed on main" | |
exit 1 | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
show-progress: false | |
- name: Setup Node.js | |
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "npm" | |
cache-dependency-path: "**/package-lock.json" | |
- name: Install dependencies | |
shell: bash | |
run: | | |
npm ci --ignore-scripts | |
- name: Release | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_TO_TRIGGER_SUBSEQUENT_WORKFLOWS }} | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm run release -- --dry-run |