mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 14:11:48 -06:00
GitHub CI Updates
Adds automation of build and release assets upon release.
This commit is contained in:
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: rlespinasse/github-slug-action@1.1.0
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get install libncurses-dev
|
||||
- name: Build
|
||||
run: |
|
||||
make
|
||||
make clean
|
||||
rm -rf .git
|
||||
- name: Upload Archive
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: RomWBW-${{env.GITHUB_REF_SLUG}}-${{env.GITHUB_SHA_SHORT}}
|
||||
path: .
|
||||
31
.github/workflows/commit.yml
vendored
Normal file
31
.github/workflows/commit.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Commit Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags-ignore:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: rlespinasse/github-slug-action@1.1.0
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
sudo apt-get install libncurses-dev
|
||||
make
|
||||
make clean
|
||||
rm -rf .git*
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: RomWBW-${{env.GITHUB_REF_SLUG}}-${{env.GITHUB_SHA_SHORT}}
|
||||
path: .
|
||||
51
.github/workflows/release.yml
vendored
Normal file
51
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Release Build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: published
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Create Package Label
|
||||
run: |
|
||||
LABEL=`echo "$GITHUB_REF" | sed "s|^refs/tags/||"`
|
||||
echo "::set-env name=PKGLBL::$LABEL"
|
||||
|
||||
- name: Display Diagnostics
|
||||
run: |
|
||||
echo PKGLBL: "$PKGLBL"
|
||||
echo Upload URL: "${{github.event.release.upload_url}}"
|
||||
echo GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
sudo apt-get install libncurses-dev
|
||||
make
|
||||
make clean
|
||||
rm -rf .git*
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: RomWBW-${{env.PKGLBL}}-Package
|
||||
path: .
|
||||
|
||||
- name: Create Package Archive
|
||||
run: |
|
||||
zip -r Package.zip .
|
||||
|
||||
- name: Upload Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
with:
|
||||
upload_url: ${{github.event.release.upload_url}}
|
||||
asset_path: Package.zip
|
||||
asset_name: RomWBW-${{env.PKGLBL}}-Package.zip
|
||||
asset_content_type: application/zip
|
||||
Reference in New Issue
Block a user