diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28d2f2f..0ef8ef5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,7 @@ on: tags: - 'v*' -permissions: - contents: write +permissions: {} jobs: build: @@ -30,12 +29,14 @@ jobs: artifact: code-memory.exe runs-on: ${{ matrix.os }} + permissions: + contents: read steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable with: targets: ${{ matrix.target }} @@ -62,7 +63,7 @@ jobs: 7z a ../../../code-memory-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.artifact }} - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: code-memory-${{ matrix.target }} path: code-memory-${{ github.ref_name }}-${{ matrix.target }}.* @@ -70,16 +71,18 @@ jobs: release: needs: build runs-on: ubuntu-latest + permissions: + contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - name: Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: path: artifacts - name: Create GitHub Release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 with: files: artifacts/**/* generate_release_notes: true @@ -87,13 +90,17 @@ jobs: publish-npm: needs: release runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 with: - node-version: '20' + node-version: '24' registry-url: 'https://registry.npmjs.org' + package-manager-cache: false - name: Update npm package version run: | @@ -104,5 +111,3 @@ jobs: - name: Publish to npm run: cd npm && npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}