-
Notifications
You must be signed in to change notification settings - Fork 2
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
1eef0ee
commit dc31c7f
Showing
1 changed file
with
54 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build_and_release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Fetch lovr exe | ||
run: | | ||
curl https://lovr.org/download -L -o lovr.zip | ||
unzip lovr.zip -d layout | ||
- name: Package Layout | ||
run: | | ||
cd src | ||
zip -0qr layout.lovr . | ||
cat ../layout/lovr.exe layout.lovr > ../layout/layout.exe | ||
cd ../layout | ||
rm lovr.exe | ||
zip -9qr layout.zip . | ||
- name: Set version number | ||
id: set_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | ||
|
||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.set_version.outputs.VERSION }} | ||
release_name: Layout ${{ steps.set_version.outputs.VERSION }} | ||
body: Layout ${{ steps.set_version.outputs.VERSION }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Layout artifact | ||
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 }} | ||
asset_path: ./layout/layout.zip | ||
asset_name: layout.zip | ||
asset_content_type: application/zip |