diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 8efb77bb..a92a1c9c 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -8,19 +8,15 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v27 with: - submodules: recursive - - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: https://registry.npmjs.org/ - cache: 'npm' - - run: npm ci - - run: rustup target add wasm32-unknown-unknown - - run: npm run build - - run: npm run bundle + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/magic-nix-cache-action@main + - run: nix develop --command npm ci + - run: nix develop --command npm run build + - run: nix develop --command npm run bundle - run: ls -lhR dist - - run: npm publish --tag next + - run: nix develop --command npm publish --tag next env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3578b53a..232cc503 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,20 +8,15 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v27 with: - submodules: recursive - - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: https://registry.npmjs.org/ - cache: 'npm' - - run: npm ci - - run: rustup target add wasm32-unknown-unknown - - run: sudo apt-get install -y binaryen - - run: npm run build - - run: npm run bundle + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/magic-nix-cache-action@main + - run: nix develop --command npm ci + - run: nix develop --command npm run build + - run: nix develop --command npm run bundle - run: ls -lhR dist - - run: npm publish + - run: nix develop --command npm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}