Skip to content

Commit 535fc9e

Browse files
committed
Merge branch 'add-release-action' into release-1.5
2 parents 7fb849d + 1b94afa commit 535fc9e

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

.github/workflows/release.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build new Herbie release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
job1:
10+
name: Create Initial Release
11+
runs-on: ubuntu-latest
12+
outputs:
13+
upload_url: ${{ steps.create_release.outputs.upload_url }}
14+
15+
steps:
16+
- name: Create Release
17+
id: create_release
18+
uses: actions/create-release@v1
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
with:
22+
tag_name: ${{ github.ref }}
23+
release_name: ${{ github.ref }}
24+
draft: true
25+
prerelease: false
26+
27+
job2:
28+
name: Build
29+
needs: job1
30+
strategy:
31+
matrix:
32+
os:
33+
- windows
34+
- ubuntu
35+
- macOS
36+
runs-on: ${{ matrix.os }}-latest
37+
steps:
38+
- uses: actions/checkout@v2
39+
40+
- name: Install Racket
41+
uses: Bogdanp/[email protected]
42+
with:
43+
version: stable
44+
45+
- name: Install Rust compiler
46+
uses: actions-rs/toolchain@v1
47+
with:
48+
toolchain: stable
49+
default: true
50+
override: true
51+
52+
- name: build egg-herbie
53+
run: cargo build --release --manifest-path=egg-herbie/Cargo.toml
54+
55+
- name: Create tarball
56+
run: raco pkg create --format zip egg-herbie
57+
58+
- name: Upload pre-build egg-herbie
59+
uses: actions/upload-release-asset@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
upload_url: ${{ needs.job1.outputs.upload_url }}
64+
asset_path: egg-herbie.zip
65+
asset_name: egg-herbie-${{ matrix.os }}.zip
66+
asset_content_type: application/zip
67+
68+
- name: Upload pre-build egg-herbie checksum
69+
uses: actions/upload-release-asset@v1
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
with:
73+
upload_url: ${{ needs.job1.outputs.upload_url }}
74+
asset_path: egg-herbie.zip.CHECKSUM
75+
asset_name: egg-herbie-${{ matrix.os }}.zip.CHECKSUM
76+
asset_content_type: application/zip

0 commit comments

Comments
 (0)