🎨 update #516
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: Nightly | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
nightly: | |
name: Deploy nightly | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
env: | |
CC: gcc | |
USE_LTO: 1 | |
runs-on: ${{ matrix.os }} | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: SubModules | |
run: git submodule update --init --recursive | |
- name: Build | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: make | |
- name: Build | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: make USE_LTO=0 | |
env: | |
BUILD_ON_WINDOWS: 1 | |
- name: Build asset | |
run: | | |
strip gwion* | |
7z a gwion-nightly.zip gwion* | |
- name: Set tag | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git tag -f -a nightly -m "Nightly update" | |
git push origin -f --follow-tags nightly | |
- name: Deploy release | |
uses: WebFreak001/deploy-nightly@v1.1.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: https://uploads.github.com/repos/Gwion/Gwion/releases/40867029/assets{?name,label} | |
release_id: 40867029 # same as above (id can just be taken out the upload_url, it's used to find old releases) | |
asset_path: ./gwion-nightly.zip # path to archive to upload | |
asset_name: gwion-nightly-${{matrix.os}}-$$.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash | |
asset_content_type: application/zip # required by GitHub API | |
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted |