Test Release (do a dry run) #4
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
show-progress: false | |
- name: Setup Node.js | |
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | |
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 |