Build release #16
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: Build release | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
build-linux: | |
name: Build linux | |
runs-on: ubuntu-latest | |
env: | |
RELEASE_OS: linux | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@master | |
- name: Setup environment | |
id: setup | |
run: echo ::set-output name=RELEASE_VERSION::${GITHUB_REF##*/} | |
- name: Build | |
run: | | |
docker run --rm dockbuild/centos5:latest > ./dockbuild \ | |
&& chmod +x ./dockbuild \ | |
&& ./dockbuild -a "-e RELEASE_OS=$RELEASE_OS -e RELEASE_VERSION=$RELEASE_VERSION" bash -c "make -f Makefile.release build && make -f Makefile.release compile_release_$RELEASE_OS" | |
env: | |
RELEASE_VERSION: ${{ steps.setup.outputs.RELEASE_VERSION }} | |
- name: Upload to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: release/bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.tar.gz | |
asset_name: bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.tar.gz | |
tag: ${{ github.ref }} | |
build-mac: | |
name: Build mac | |
runs-on: macos-latest | |
env: | |
RELEASE_OS: mac | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@master | |
- name: Setup environment | |
id: setup | |
run: echo ::set-output name=RELEASE_VERSION::${GITHUB_REF##*/} | |
- name: Build | |
run: make -f Makefile.release build && make -f Makefile.release compile_release_$RELEASE_OS | |
env: | |
RELEASE_VERSION: ${{ steps.setup.outputs.RELEASE_VERSION }} | |
- name: Upload to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: release/bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.tar.gz | |
asset_name: bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.tar.gz | |
tag: ${{ github.ref }} | |
build-windows: | |
name: Build windows | |
runs-on: ubuntu-latest | |
env: | |
RELEASE_OS: windows | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@master | |
- name: Setup environment | |
id: setup | |
run: echo ::set-output name=RELEASE_VERSION::${GITHUB_REF##*/} | |
- name: Build | |
run: | | |
docker run --rm dockcross/windows-static-x64:20221217-6afd127 > ./dockcross \ | |
&& chmod +x ./dockcross \ | |
&& ./dockcross -a "-e RELEASE_OS=$RELEASE_OS -e RELEASE_VERSION=$RELEASE_VERSION" bash -c "make -f Makefile.release install_zlib && make -f Makefile.release build && make -f Makefile.release compile_release_$RELEASE_OS" | |
env: | |
RELEASE_VERSION: ${{ steps.setup.outputs.RELEASE_VERSION }} | |
- name: Upload to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: release/bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.zip | |
asset_name: bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.zip | |
tag: ${{ github.ref }} |