Added green glow to bagman #9
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
name: build and deploy release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
if: github.repository == 'KovaaK/ktx' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [linux-amd64, linux-i686, linux-armhf, linux-aarch64, windows-x64, windows-x86] | |
include: | |
- target: linux-amd64 | |
os: linux | |
arch: amd64 | |
ext: ".so" | |
- target: linux-i686 | |
os: linux | |
arch: i686 | |
ext: ".so" | |
- target: linux-armhf | |
os: linux | |
arch: armhf | |
ext: ".so" | |
- target: linux-aarch64 | |
os: linux | |
arch: aarch64 | |
ext: ".so" | |
- target: windows-x64 | |
os: windows | |
arch: x64 | |
ext: ".dll" | |
- target: windows-x86 | |
os: windows | |
arch: x86 | |
ext: ".dll" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Build Environemnt | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install build-essential cmake gcc-i686-linux-gnu | |
sudo apt-get -y install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross | |
sudo apt-get -y install gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 | |
- name: Build | |
run: | | |
./build_cmake.sh ${{ matrix.target }} | |
- name: Create checksum | |
run: | | |
md5sum build/${{ matrix.target }}/qwprogs${{ matrix.ext }} > build/${{ matrix.target }}/qwprogs.md5 | |
- name: Create Release Asset | |
run: | | |
mkdir -p release/${{ matrix.os }}/${{ matrix.arch }} | |
cp build/${{ matrix.target }}/qwprogs${{ matrix.ext }} release/${{ matrix.os }}/${{ matrix.arch }}/qwprogs${{ matrix.ext }} | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }}_${{ matrix.arch }} | |
path: | |
build/${{ matrix.target }}/qwprogs${{ matrix.ext }} | |
create: | |
needs: build | |
if: github.repository == 'KovaaK/ktx' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: release | |
- name: list | |
run: | | |
find ./ | |
- name: Create Release Asset | |
run: | | |
zip -r release.zip release | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: Release ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
asset_path: ./release.zip | |
asset_name: release.zip | |
asset_content_type: application/zip |