Skip to content

Commit

Permalink
Redo the egg-herbie release action
Browse files Browse the repository at this point in the history
  • Loading branch information
pavpanchekha committed Feb 2, 2024
1 parent 5001a2f commit 225bdf4
Showing 1 changed file with 33 additions and 35 deletions.
68 changes: 33 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,6 @@ on:
- 'v*'

jobs:
job1:
name: Create Initial Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}

steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false

job2:
name: Build
needs: job1
Expand All @@ -45,7 +27,7 @@ jobs:
- name: Install Racket
uses: Bogdanp/[email protected]
with:
version: 8.7
version: 8.11

- name: Install Rust compiler
uses: actions-rs/[email protected]
Expand All @@ -60,22 +42,38 @@ jobs:
- name: Create tarball
run: raco pkg create --format zip egg-herbie

- name: Upload pre-build egg-herbie
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload pre-built egg-herbie
uses: actions/upload-artifact@v4
with:
path: egg-herbie.zip
name: egg-herbie-${{ matrix.os-name }}.zip

- name: Upload pre-built egg-herbie checksum
uses: actions/upload-artifact@v4
with:
upload_url: ${{ needs.job1.outputs.upload_url }}
asset_path: egg-herbie.zip
asset_name: egg-herbie-${{ matrix.os-name }}.zip
asset_content_type: application/zip
path: egg-herbie.zip.CHECKSUM
name: egg-herbie-${{ matrix.os-name }}.zip.CHECKSUM

- name: Upload pre-build egg-herbie checksum
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
name: Create Initial Release
runs-on: ubuntu-latest
needs: build

steps:
- name: Download pre-built artifacts
uses: actions/download-artifact@v4
with:
upload_url: ${{ needs.job1.outputs.upload_url }}
asset_path: egg-herbie.zip.CHECKSUM
asset_name: egg-herbie-${{ matrix.os-name }}.zip.CHECKSUM
asset_content_type: application/zip
path: egg-herbie
pattern: egg-herbie-*
merge-multiple: true

- name: Create Release
uses: ncipollo/release-action
uses: actions/create-release@v1
with:
tag: ${{ github.ref }}
name: ${{ github.ref }}
commit: ${{ github.commit }}
draft: true
prerelease: false
artifacts: egg-herbie/egg-herbie-*

0 comments on commit 225bdf4

Please sign in to comment.