name: Test Release (do a dry run)
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
on:
workflow_dispatch:
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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Setup Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c 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.GITHUB_TOKEN }}
run: |
echo "::group::Release dry run output"
npm run release -- --dry-run
echo "::endgroup::"