diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 906e1fb3..a6c3c9d7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,5 +5,4 @@ If this is for a release: * [ ] I have updated documentation -* [ ] I have updated the hardcoded version at the top of `install.sh` to match what this release's version will be -* [ ] I have created a release archive that will be attached to this release (`bash dev_scripts/generate_archive.sh`) \ No newline at end of file +* [ ] I have updated the hardcoded version at the top of `install.sh` to match what this release's version will be \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9cd59302..c72b00af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: types: [published] workflow_dispatch: - + jobs: run-tests: uses: ./.github/workflows/tests.yml @@ -44,6 +44,35 @@ jobs: echo "Versions don't match, exiting..." exit 1 fi + + generate-tarball: + name: Generate Tarball and Add to Release + runs-on: ubuntu-latest + needs: + - run-tests + - check-version + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Generate Tarball + run: bash dev_scripts/generate_archive.sh + + - name: Upload Tarball + uses: actions/upload-artifact@v2 + with: + name: sunbeam.tar.gz + path: sunbeam.tar.gz + + - name: Add Tarball to Release + uses: irongut/EditRelease@v1.2.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + id: ${{ github.event.release.id }} + body: "### Sunbeam Tarball\nDownload the Sunbeam tarball from the release page to install Sunbeam locally.\n[Download Sunbeam Tarball](https://github.com/sunbeam-labs/sunbeam/releases/${{ needs.check-version.outputs.version }}/download/sunbeam.tar.gz" + replacebody: false + files: "sunbeam.tar.gz" test-tarball: name: Test Tarball @@ -51,6 +80,7 @@ jobs: needs: - run-tests - check-version + - generate-tarball steps: - name: setup-conda