From 61860a831e3157b4fda77d8f86bfccd779bb2fa3 Mon Sep 17 00:00:00 2001 From: Harold <75729237+surelle-ha@users.noreply.github.com> Date: Fri, 1 Nov 2024 23:18:53 +0800 Subject: [PATCH] chore: construct workflow --- .github/workflows/deploy.yml | 49 ++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9414d55..1697193 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,30 +1,35 @@ name: Registry on: - push: - branches: - - main - - ci/* - - feature/* - - test/* + push: + branches: + - main + - ci/* + - feature/* + - test/* jobs: - publish-gpr: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + publish-gpr: + permissions: + contents: read + packages: write + attestations: write + id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '20' - registry-url: 'https://npm.pkg.github.com/' - scope: '@bismuthjs' + - uses: actions/setup-node@v3 + with: + node-version: "20" + registry-url: "https://npm.pkg.github.com/" + scope: "@bismuthjs" - - name: Write .npmrc - run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc + - name: Write .npmrc + run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc - - run: npm install --legacy-peer-deps - - run: tsc --build - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: npm install --legacy-peer-deps + - run: tsc --build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}