mirror of
https://github.com/kunkunsh/kunkun-ext-ip-info.git
synced 2025-04-03 19:06:42 +00:00
35 lines
1.0 KiB
YAML
35 lines
1.0 KiB
YAML
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
|
|
name: Node.js Package
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
publish-gpr:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
registry-url: https://npm.pkg.github.com/
|
|
- uses: oven-sh/setup-bun@v2
|
|
- run: bun install
|
|
- run: bun run build
|
|
- run: npm publish
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
# - name: Generate artifact attestation
|
|
# uses: actions/attest-build-provenance@v2
|
|
# with:
|
|
# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
# subject-digest: 'sha256:fedcba0...'
|
|
# push-to-registry: true |