Skip to content

Commit

Permalink
feat(CI): Let's try doing releases
Browse files Browse the repository at this point in the history
  • Loading branch information
FiniteReality committed Feb 21, 2022
1 parent b2f8d0f commit ee2407b
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ on:
- 'main'

jobs:
create-release:
runs-on: ubuntu-latest

outputs:
release: ${{ steps.tag_version.outputs.new_tag }}

steps:
- uses: actions/checkout@v2

- uses: mathieudutour/[email protected]
id: tag_version
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Fabulist ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
prerelease: true
draft: true

build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.lua == '5.1' }}
Expand Down Expand Up @@ -43,7 +65,7 @@ jobs:
path: inst

merge-artifacts:
needs: build
needs: [build, create-release]
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -65,3 +87,18 @@ jobs:
with:
name: fabulist-${{ matrix.os }}-lua${{ matrix.lua }}
path: merged

- uses: actions/download-artifact@v2
with:
name: fabulist-${{ matrix.os }}-lua${{ matrix.lua }}

- name: Create release artifact
run: |
cd merged
zip -r "../fabulist-${{ matrix.os }}-lua${{ matrix.lua }}.zip" .
cd ..
- name: Add merged artifacts to release
run: gh release upload "${{ needs.create-release.outputs.release }}" "fabulist-${{ matrix.os }}-lua${{ matrix.lua }}.zip" --repo "$GITHUB_REPOSITORY"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ee2407b

Please sign in to comment.