Update package.json #1
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: Release | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| inputs: | |
| checkout-branch: | |
| description: 'The branch or tag to checkout (same as workflow if not specified)' | |
| required: false | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| lastest-tag: ${{ steps.get-tag.outputs.tag }} | |
| steps: | |
| - name: Get latest tag | |
| id: get-tag | |
| uses: WyriHaximus/github-action-get-previous-tag@v1.4.0 | |
| build: | |
| needs: prepare | |
| strategy: | |
| fail-fast: false | |
| runs-on: windows-2019 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.checkout-branch }} | |
| submodules: true | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install node-gyp | |
| run: bun add -g node-gyp | |
| - name: Install dependencies | |
| run: bun install --ignore-scripts | |
| - name: Build | |
| run: bun run build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: memoryjs | |
| path: lib/ | |
| release: | |
| needs: [prepare, build] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # allows the action to create a release | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4.1.7 | |
| - name: Publish release | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |