Skip to content

Snapshot release 2.0.0 #3

Snapshot release 2.0.0

Snapshot release 2.0.0 #3

name: Snapshot release
run-name: 'Snapshot release ${{ inputs.version }}'
on:
workflow_dispatch:
inputs:
version:
description: Base version to use for the release
required: true
type: string
env:
FORCE_COLOR: 3 # Diplay chalk colors
jobs:
snapshot:
name: Deployment
runs-on: ubuntu-latest
steps:
- name: Generate snapshot version
id: version
run: |
version="${{ inputs.version }}-snapshot.$(date +%Y-%m-%d).$(echo $GITHUB_SHA | cut -c1-8)"
echo "version=${version}" >> $GITHUB_OUTPUT
echo "::notice title=Version::${version}"
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: Build package
run: pnpm build --filter nuqs
- name: Publish package
working-directory: packages/nuqs
run: |
pnpm pkg set version=${{ steps.version.outputs.version }}
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
pnpm publish --access public --tag snapshot --no-git-checks
rm -f .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: failure()
with:
status: ${{ job.status }}
jobName: Snapshot release ${{ steps.version.outputs.version }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}