Build release #22
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 release | |
permissions: | |
contents: write | |
on: | |
workflow_dispatch: | |
jobs: | |
make-tarball: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Compute release tag | |
id: ts | |
run: echo "tag=$(date -u +%Y%m%d%H%M)" | tee -a "$GITHUB_OUTPUT" | |
- name: Check out sources | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Install packages | |
run: | | |
pnpm install \ | |
--frozen-lockfile \ | |
--verify-store-integrity \ | |
--shamefully-hoist \ | |
--node-linker hoisted \ | |
--force | |
- name: Remove timestamped files and junk | |
run: | | |
rm -f node_modules/.modules.yaml node_modules/.pnpm-workspace-state.json | |
rm -rf .git | |
- name: Make tarball | |
env: | |
TAG: ${{ steps.ts.outputs.tag }} | |
run: | | |
find . -print0 \ | |
| sort -z \ | |
| GZIP="-9n" tar -zcf "/tmp/helium-onboarding-$TAG.tar.gz" \ | |
--format=posix \ | |
--numeric-owner \ | |
--owner=0 \ | |
--group=0 \ | |
--pax-option='delete=atime,delete=ctime' \ | |
--mode='go+u,go-w' \ | |
--preserve-permissions \ | |
--mtime='1970-01-01' \ | |
--no-recursion \ | |
--null \ | |
--files-from - | |
- name: Make release body | |
run: | | |
cd /tmp | |
echo '```' > release.md | |
sha256sum helium*.tar.gz >> release.md | |
echo '```' >> release.md | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
id: release | |
with: | |
body_path: /tmp/release.md | |
draft: false | |
prerelease: true | |
files: /tmp/helium-onboarding-${{ steps.ts.outputs.tag }}.tar.gz | |
name: ${{ steps.ts.outputs.tag }} | |
tag_name: ${{ steps.ts.outputs.tag }} | |
token: ${{ secrets.GITHUB_TOKEN }} |