-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69e3d6f
commit 60c0054
Showing
1 changed file
with
9 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,24 +2,23 @@ name: Build Canabalt | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
RELEASE_TAG: ${{startsWith(github.ref, 'refs/tags/') && github.ref || 'bleeding'}} | ||
|
||
jobs: | ||
create-latest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Github Releases Upload | ||
- name: Github Releases Bleeding Upload | ||
if: env.BRANCH_NAME == 'main' | ||
uses: marvinpinto/[email protected] | ||
with: | ||
repo_token: "${{ github.token }}" | ||
automatic_release_tag: "bleeding" | ||
prerelease: true | ||
title: "Canabalt Bleeding edge" | ||
automatic_release_tag: "${{env.RELEASE_TAG}}" | ||
prerelease: ${{startsWith(env.RELEASE_TAG, 'bleeding') && 'true' || 'false'}} | ||
download_haxe: | ||
strategy: | ||
matrix: | ||
|
@@ -113,21 +112,20 @@ jobs: | |
./butler -V | ||
- name: Push to itch.io | ||
run: | | ||
./butler push export/*/bin ninja-muffin24/canabalt-hf:${{ matrix.target }} | ||
./butler push export/*/bin ninja-muffin24/canabalt-hf:${{ matrix.target }}-${{env.RELEASE_TAG}}-${{env.BRANCH_NAME}} | ||
shell: bash | ||
- name: Get current date | ||
id: date | ||
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | ||
- run: tar cf - export/${{matrix.target}}/bin/ | gzip > canabalt-${{matrix.target}}-${{ steps.date.outputs.date }}.tar.gz | ||
- run: tar cf - export/${{matrix.target}}/bin/ | gzip > canabalt-${{matrix.target}}-${{ steps.date.outputs.date }}-${{env.BRANCH_NAME}}.tar.gz | ||
if: matrix.target == 'linux' | ||
- uses: vimtor/[email protected] # too lazy to figure out 7z grrr... | ||
if: matrix.target != 'linux' | ||
with: | ||
files: export/${{matrix.target}}/bin/ | ||
dest: canabalt-${{matrix.target}}-${{ steps.date.outputs.date }}.zip | ||
dest: canabalt-${{matrix.target}}-${{ steps.date.outputs.date }}-${{env.BRANCH_NAME}}.zip | ||
- name: Upload build to Github releases | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: gh release upload bleeding canabalt-${{matrix.target}}-${{ steps.date.outputs.date }}.* --clobber | ||
run: gh release upload ${{env.RELEASE_TAG}} canabalt-${{matrix.target}}-${{ steps.date.outputs.date }}-${{env.BRANCH_NAME}}.* --clobber | ||
shell: bash |