Skip to content

Commit

Permalink
release v0.2.0 and add automated releases to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vsariola committed Sep 24, 2023
1 parent ee2c83e commit 545f32b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
57 changes: 56 additions & 1 deletion .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,36 @@ on:
branches:
- master
- dev
tags:
- 'v*'
pull_request:
branches:
- master
- dev

jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
# Note this. We are going to use that in further jobs.
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v2
- 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_name }}
body_path: CHANGELOG.md
draft: false
prerelease: false
if: startsWith(github.ref, 'refs/tags/')
binaries:
needs: create_release # we need to know the upload URL
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
Expand Down Expand Up @@ -92,4 +115,36 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: sointu-${{ runner.os }}-${{ steps.short-sha.outputs.sha }}
path: ${{ matrix.config.output }}
path: ${{ matrix.config.output }}
upload_release_asset:
needs: [create_release, binaries]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
strategy:
matrix:
config:
- os: Windows
- os: Linux
- os: macOS
steps:
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: sointu-${{ matrix.config.os }}-${{ steps.short-sha.outputs.sha }}
path: sointu-${{ matrix.config.os }}
- name: Zip binaries
run: |
zip ./sointu-${{ matrix.config.os }}.zip sointu-${{ matrix.config.os }}/*
- name: Upload release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: sointu-${{ matrix.config.os }}.zip
asset_path: ./sointu-${{ matrix.config.os }}.zip
asset_content_type: application/octet-stream
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased
## v0.2.0
### Added
- Saving and loading instruments
- Comment field to instruments
Expand Down Expand Up @@ -69,5 +69,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- a command line utility to convert .yml songs to .asm
- a command line utility to play the songs on command line

[Unreleased]: https://github.com/vsariola/sointu/compare/v0.1.0...HEAD
[Unreleased]: https://github.com/vsariola/sointu/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/vsariola/sointu/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/vsariola/sointu/compare/4klang-3.11...v0.1.0

0 comments on commit 545f32b

Please sign in to comment.