Publish #12
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: Publish | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| permissions: | |
| contents: write | |
| jobs: | |
| jsr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - run: deno publish --token=${{ secrets.JSR_API }} | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - run: mkdir bin | |
| - name: Compile for Linux arm64 | |
| run: | | |
| deno compile \ | |
| --target=aarch64-unknown-linux-gnu \ | |
| --output=bin/staticalize-linux-arm64 \ | |
| --include=deno.json \ | |
| --allow-read --allow-write --allow-net --allow-env main.ts | |
| - name: Compile for macOS arm64 | |
| run: | | |
| deno compile \ | |
| --target=aarch64-apple-darwin \ | |
| --output=bin/staticalize-macos-arm64 \ | |
| --include=deno.json \ | |
| --allow-read --allow-write --allow-net --allow-env main.ts | |
| - name: Compile for Linux x64 | |
| run: | | |
| deno compile \ | |
| --target=x86_64-unknown-linux-gnu \ | |
| --output=bin/staticalize-linux \ | |
| --include=deno.json \ | |
| --allow-read --allow-write --allow-net --allow-env main.ts | |
| - name: Compile for Windows x64 | |
| run: | | |
| deno compile \ | |
| --target=x86_64-pc-windows-msvc \ | |
| --output=bin/staticalize-windows \ | |
| --include=deno.json \ | |
| --allow-read --allow-write --allow-net --allow-env main.ts | |
| - name: Compile for macOS x64 | |
| run: | | |
| deno compile \ | |
| --target=x86_64-apple-darwin \ | |
| --output=bin/staticalize-macos \ | |
| --include=deno.json \ | |
| --allow-read --allow-write --allow-net --allow-env main.ts | |
| - name: Compress binaries | |
| run: | | |
| cd bin | |
| zip staticalize-windows.zip staticalize-windows.exe | |
| tar -czf staticalize-macos.tar.gz staticalize-macos | |
| tar -czf staticalize-macos-arm64.tar.gz staticalize-macos-arm64 | |
| tar -czf staticalize-linux.tar.gz staticalize-linux | |
| tar -czf staticalize-linux-arm64.tar.gz staticalize-linux-arm64 | |
| rm staticalize-windows.exe \ | |
| staticalize-macos \ | |
| staticalize-macos-arm64 \ | |
| staticalize-linux \ | |
| staticalize-linux-arm64 | |
| - name: Upload to Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| token: ${{ secrets.JACK_GITHUB_TOKEN }} | |
| make_latest: true | |
| files: bin/* |