Skip to content

Snapshot release 2.0.0 #2

Snapshot release 2.0.0

Snapshot release 2.0.0 #2

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@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
- 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 }}