Skip to content

Commit

Permalink
Add GitHub Actions (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiabaldonado authored Oct 11, 2020
1 parent 1eef0ee commit dc31c7f
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build_and_release.yml
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

0 comments on commit dc31c7f

Please sign in to comment.