mirror of
https://github.com/pret/agbcc.git
synced 2026-04-26 08:10:18 -05:00
Merge tag 'master' of https://github.com/ethteck/agbcc into ethteck-master
master (automatically created)
This commit is contained in:
commit
ce7808c1bd
59
.github/workflows/build.yml
vendored
59
.github/workflows/build.yml
vendored
|
|
@ -5,13 +5,68 @@ on:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
pull_request:
|
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:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@main
|
||||||
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
|
||||||
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
run: sh build.sh
|
run: sh build.sh
|
||||||
|
|
||||||
|
# No point in running the following steps if we are not deploying
|
||||||
|
# See https://github.com/actions/runner/issues/1395 for why fromJSON() is needed
|
||||||
|
- name: Install to temp dir
|
||||||
|
if: fromJSON(env.IS_DEPLOY)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir TEMPDIR
|
||||||
|
sh install.sh TEMPDIR
|
||||||
|
|
||||||
|
- name: Create release archive
|
||||||
|
if: fromJSON(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@main
|
||||||
|
if: fromJSON(env.IS_DEPLOY)
|
||||||
|
with:
|
||||||
|
name: agbcc.tar.gz
|
||||||
|
path: agbcc.tar.gz
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Download archive
|
||||||
|
uses: actions/download-artifact@main
|
||||||
|
with:
|
||||||
|
name: agbcc.tar.gz
|
||||||
|
|
||||||
|
- name: Update release
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
artifactErrorsFailBuild: true
|
||||||
|
artifacts: agbcc.tar.gz
|
||||||
|
commit: ${{ github.sha }}
|
||||||
|
makeLatest: true # This is a test
|
||||||
|
tag: release
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }} # Automatically created by the workflow with a lifetime of one hour
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user