Create draft release and build release artifacts #29
Workflow file for this run
This file contains 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
on: | |
push: | |
tags: | |
- 'v*.*' | |
name: Create draft release and build release artifacts | |
# We have two separate jobs so that a human can start proof-reading and | |
# improving the release notes as quickly as possible. Generating the artifacts | |
# takes quite a while. This way, they are simply added once ready. | |
jobs: | |
create-draft-release: | |
name: Create draft release from tag | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Create draft release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
generate_release_notes: true | |
body: | | |
<!-- Add this when there are no breaking changes. | |
🟢 There are no [breaking changes](https://elan-ev.github.io/tobira/versioning-policy#breaking-and-non-breaking-changes). | |
--> | |
build-and-attach-artifacts: | |
name: Build and attach release artifacts | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create release build | |
run: ./x.sh build-release | |
- name: Rename binary to include target information | |
run: mv deploy/tobira deploy/tobira-x86_64-unknown-linux-gnu | |
- name: create new release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
deploy/tobira-x86_64-unknown-linux-gnu | |
deploy/config.toml | |
draft: true | |
fail_on_unmatched_files: true | |
generate_release_notes: true | |
build-musl: | |
name: Build musl release | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install musl requisites | |
run: sudo apt install -y musl-dev musl-tools | |
- name: Install musl target | |
run: rustup target add x86_64-unknown-linux-musl | |
- name: Create release build | |
run: ./x.sh build-release --musl | |
- name: Rename binary to include target information | |
run: mv deploy/tobira deploy/tobira-x86_64-unknown-linux-musl | |
- name: create new release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
deploy/tobira-x86_64-unknown-linux-musl | |
draft: true | |
fail_on_unmatched_files: true | |
generate_release_notes: true |