Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
z80maniac committed May 8, 2021
0 parents commit ec00c48
Show file tree
Hide file tree
Showing 18 changed files with 3,569 additions and 0 deletions.
121 changes: 121 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Build and release


on:
push:
branches:
- master
tags:
- v*


jobs:
build-linux:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Build
run: ./build-unix.sh

- name: Archive
run: tar -cf- -C target/release musbconv | xz -c9e - > musbconv-linux.tar.xz

- name: Save
uses: actions/upload-artifact@v2
with:
name: release-linux
path: "*.tar.xz"


build-windows:
runs-on: windows-2019

steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Build
run: .\build-windows.ps1

- name: Archive
run: Compress-Archive -Path target\release\musbconv.exe -DestinationPath musbconv-windows.zip

- name: Save
uses: actions/upload-artifact@v2
with:
name: release-windows
path: "*.zip"


build-macos:
runs-on: macos-10.15

steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Build
run: ./build-unix.sh

- name: Archive
run: tar -cf- -C target/release musbconv | xz -c9e - > musbconv-macos.tar.xz

- name: Save
uses: actions/upload-artifact@v2
with:
name: release-macos
path: "*.tar.xz"


release:
if: startsWith(github.ref, 'refs/tags/')

needs:
- build-linux
- build-windows
- build-macos

runs-on: ubuntu-20.04
steps:
- name: Version
id: version
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/}

- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Notes
run: grep -Pzom1 "(?s)\n[##\s]*${{ steps.version.outputs.version }}.*?\n+.*?\K.*?(\n\n|$)" CHANGELOG.md | sed 's/[^[:print:]]//g' > RELEASE.md

- name: Download
uses: actions/download-artifact@v2
with:
path: artifacts

- name: Rename
run: |
mv artifacts/release-linux/musbconv-linux.tar.xz artifacts/release-linux/musbconv-linux-${{ steps.version.outputs.version }}.tar.xz
mv artifacts/release-windows/musbconv-windows.zip artifacts/release-windows/musbconv-windows-${{ steps.version.outputs.version }}.zip
mv artifacts/release-macos/musbconv-macos.tar.xz artifacts/release-macos/musbconv-macos-${{ steps.version.outputs.version }}.tar.xz
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
artifacts/release-linux/*.tar.xz
artifacts/release-windows/*.zip
artifacts/release-macos/*.tar.xz
body_path: RELEASE.md
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/target/
/lib/
.*
!.gitignore
!.github/
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# musbconv - CHANGELOG


## v0.1.0 (May 9, 2021)

- Initial release
Loading

0 comments on commit ec00c48

Please sign in to comment.