-
Notifications
You must be signed in to change notification settings - Fork 0
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
2b2d18d
commit a163d08
Showing
2 changed files
with
72 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,21 @@ | ||
name: CI/CD | ||
|
||
on: | ||
- push | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install graphics libraries | ||
run: sudo apt-get install --quiet -y libglfw3-dev libxi-dev libxcursor-dev | ||
|
||
- name: Install ASPL | ||
uses: aspl-lang/setup-aspl@v1 | ||
|
||
- name: Build Libellus | ||
run: aspl -cc gcc -backend c compile . |
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,51 @@ | ||
name: Create Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
description: "Release version" | ||
required: true | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install graphics libraries | ||
run: sudo apt-get install --quiet -y libglfw3-dev libxi-dev libxcursor-dev | ||
|
||
- name: Install ASPL | ||
uses: aspl-lang/setup-aspl@v1 | ||
|
||
- name: Build Libellus | ||
run: aspl -cc gcc -backend c -prod compile . | ||
|
||
- name: Archive built executable | ||
run: | | ||
mkdir -p bin | ||
mv Libellus bin/Libellus-${{ github.event.inputs.release_version }}-linux | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.inputs.release_version }} | ||
release_name: ${{ github.event.inputs.release_version }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: 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: bin/Libellus-${{ github.event.inputs.release_version }}-linux | ||
asset_name: Libellus-${{ github.event.inputs.release_version }}-linux | ||
asset_content_type: application/octet-stream |