improved developer experience on failures #7
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
name: Release zencode tools | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
semantic-release: | |
name: 🤖 Semantic release | |
runs-on: ubuntu-latest | |
if: ${{ github.ref_name == 'master' && github.event_name == 'push' }} | |
outputs: | |
release: ${{ steps.tag_release.outputs.release }} | |
version: ${{ steps.tag_release.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- run: yarn | |
- name: Tag release | |
id: tag_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npx semantic-release | tee semantic-release.log | |
if [[ `git tag --points-at HEAD` == "" ]]; then | |
echo "release=False" >> $GITHUB_OUTPUT | |
else | |
echo "release=True" >> $GITHUB_OUTPUT | |
awk '/Published release/ { printf("version=v%s\n",$8) }' semantic-release.log >> $GITHUB_OUTPUT | |
fi | |
build-release-on-ubuntu: | |
name: 🐧 Binary builds on Ubuntu | |
runs-on: ubuntu-latest | |
needs: [semantic-release] | |
if: ${{ needs.semantic-release.outputs.release == 'True' }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
- name: Upload release docs artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: documentation | |
path: | | |
release-intro.md | |
- name: Install build deps | |
run: | | |
sudo apt install make | |
- name: Build | |
run: make | |
- name: Upload artifact linux-amd64 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-bin-linux-amd64 | |
path: | | |
zenexplorer | |
zendebug | |
restroom-test | |
draft-binary-release: | |
name: 📦 Pack release | |
needs: [semantic-release, build-release-on-ubuntu] | |
runs-on: ubuntu-latest | |
steps: | |
- name: download binary artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: | | |
zenroom-bin | |
- name: relase all binary artifacts | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
zenroom-bin/release*/* | |
tag_name: ${{ needs.semantic-release.outputs.version }} | |
body_path: zenroom-bin/documentation/release-intro.md | |
append_body: true | |
draft: false | |
prerelease: false | |
fail_on_unmatched_files: true | |
generate_release_notes: true |