From ab920b908f2ad23110a1128d3aaa3788fb409f40 Mon Sep 17 00:00:00 2001 From: wChenonly Date: Fri, 15 Dec 2023 13:13:41 +0800 Subject: [PATCH] ci: update deps --- .github/workflows/releases.yml | 35 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index c5524b5..57ade2b 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -1,4 +1,4 @@ -name: 🎉 Release +name: Release on: push: @@ -7,36 +7,37 @@ on: jobs: release: + permissions: + id-token: write + contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm - - name: Set node + - name: Setup node uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: lts/* cache: pnpm + registry-url: 'https://registry.npmjs.org' - - run: npx changelogithub - continue-on-error: true + - name: Generate changelog + run: npx changelogithub env: - GITHUB_TOKEN: ${{secrets.GH_TOKEN}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install - run: pnpm install --no-frozen-lockfile + - name: Install Dependencies + run: pnpm install - name: Build - run: pnpm run build - - - name: Config npm - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > dist/.npmrc - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: pnpm build - name: Publish to npm - run: cd dist && pnpm run publish:npm + run: pnpm publish --access public --no-git-checks + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: true