more build improvements #168
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 for GitHub | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: "v2.2.2" | |
| - uses: actions/checkout@v4 | |
| - uses: polyseam/tag-matches-version@v1 | |
| - run: deno task checks | |
| - run: deno task test | |
| - run: deno task build | |
| # this ensures `cndi upgrade` works for users with cndi@<v2.27 | |
| # it's a waste of disk space for GitHub and we should remove it when we are certain all users have upgraded | |
| - name: duplicate macos archive for backwards compatibility | |
| # assumes the user will be on apple silicon despite the previous macos version being amd64 | |
| run: cp ./dist/release-archives/cndi-mac-arm64.tar.gz ./dist/release-archives/cndi-mac.tar.gz | |
| - name: duplicate linux archive for backwards compatibility | |
| run: cp ./dist/release-archives/cndi-linux-amd64.tar.gz ./dist/release-archives/cndi-linux.tar.gz | |
| - name: duplicate windows archive for backwards compatibility | |
| run: cp ./dist/release-archives/cndi-win-amd64.tar.gz ./dist/release-archives/cndi-win.tar.gz | |
| - name: Install cndi dependency binaries | |
| run: mkdir -p /home/runner/.cndi/bin && cp ./dist/linux-amd64/in/* /home/runner/.cndi/bin | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| dist/release-archives/cndi-* |