Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

decomp.me CD Test

decomp.me CD Test #3

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
# Note, Github Actions is dumb and only steps - not jobs - can access env.
# Therefore, if you update this, make sure to update the deploy job below.
env:
IS_DEPLOY: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install deps
run: |
sudo apt update
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
- name: Compile
run: sh build.sh
# No point in running the following steps if we are not deploying
- name: Install to temp dir
if: ${{ env.IS_DEPLOY }}
shell: bash
run: sh install.sh TEMPDIR
- name: Create release archive
if: ${{ env.IS_DEPLOY }}
shell: bash
run: tar -C TEMPDIR/tools/agbcc -czf agbcc.tar.gz bin include lib
- name: Upload archive
uses: actions/upload-artifact@v2
if: ${{ env.IS_DEPLOY }}
with:
name: agbcc.tar.gz
path: agbcc.tar.gz
deploy:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- name: Update release
uses: johnwbyrd/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }} # Automatically created by the workflow with a lifetime of one hour
files: agbcc.tar.gz