Skip to content

Merge pull request #93 from NillionNetwork/feat/require-expiry #49

Merge pull request #93 from NillionNetwork/feat/require-expiry

Merge pull request #93 from NillionNetwork/feat/require-expiry #49

Workflow file for this run

name: CD
on:
push:
branches: [ "main" ]
workflow_dispatch:
concurrency:
group: "publish"
cancel-in-progress: true
jobs:
check-version:
runs-on: ubuntu-latest
outputs:
should_publish: ${{ steps.check-version.outputs.local_version_is_higher }}
tag: ${{ steps.check-version.outputs.tag }}
version: ${{ steps.check-version.outputs.local_version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
- uses: pnpm/action-setup@v4
- run: pnpm install
- id: check-version
run: pnpm exec tsx bin/check-version.ts
publish:
needs: check-version
if: needs.check-version.outputs.should_publish == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-node@v4
with:
node-version: "23"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm build
- run: pnpm exec biome ci
- run: tsc
- env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --tag ${{ needs.check-version.outputs.tag }} --no-git-checks
- name: Create GH Release
id: create-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
[[ "${{ needs.check-version.outputs.tag }}" == "next" ]] && PRERELEASE="-p" || PRERELEASE=""
gh release create 'nuc-ts-v${{ needs.check-version.outputs.version }}' --generate-notes $PRERELEASE --title "nuc-ts-v${{ needs.check-version.outputs.version }}"
- name: Upload artifact to GH Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >-
gh release upload 'nuc-ts-v${{ needs.check-version.outputs.version }}' *.tgz