chore: .npmrc update #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release Artifacts | |
| permissions: | |
| contents: write | |
| packages: write | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v27 | |
| - name: Build flake package | |
| run: nix build | |
| - name: Copy Built Result | |
| run: | | |
| mkdir -p ${{ github.workspace }}/artifacts | |
| cp -r ./result/bin/mms ${{ github.workspace }}/artifacts | |
| - name: Build wasm | |
| run: nix build ".#wasm" | |
| - name: Publish built wasm package | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cd ./result/js | |
| npm publish --access public | |
| # - name: Copy wasm Result | |
| # run: | | |
| # cp -r ./result/main.wasm ${{ github.workspace }}/artifacts/mms.wasm | |
| # cp -r ./result/wasm_exec.js ${{ github.workspace }}/artifacts/go_wasm_loader.js | |
| - name: Get tag name | |
| id: get_tag | |
| run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.get_tag.outputs.tag }} | |
| files: ${{ github.workspace }}/artifacts/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |