Skip to content

Commit

Permalink
buildtest branches too (#441)
Browse files Browse the repository at this point in the history
* build branches too
* will build branches on forks to assist devs (github actions)
* artifact_name (.zip) will be named based on emuflight or developer
  • Loading branch information
nerdCopter authored Dec 15, 2020
1 parent b3e34c7 commit 8e73765
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ on:
push:
tags:
- '*'
branches:
- '*'
pull_request:
branches:
- '*'
Expand Down Expand Up @@ -67,14 +69,28 @@ jobs:
run: echo "REVISION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/')

- name: Make artifact name
id: make_artifactname
run: |
if ["${{ github.REPOSITORY }}" == "emuflight/EmuFlight"] ; then
ARTIFACT_NAME="EmuFlight-${{ env.VERSION }}-${{ github.run_number }}"
else
ARTIFACT_NAME="EmuFlight-${{ env.VERSION }}-${{ github.ACTOR }}-${{ github.run_number }}"
fi
echo "${ARTIFACT_NAME}"
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
# for debugging
- name: Show Variables
id: show_vars
run: |
echo "Actor: ${{ github.ACTOR }}"
echo "Repo: ${{ github.REPOSITORY }}"
echo "Build: ${{ github.run_number }}"
echo "Firmware: ${{ env.VERSION }}"
echo "Commit: ${{ github.sha }}"
echo "tag: ${{ env.REVISION_TAG}}"
echo "Tag: ${{ env.REVISION_TAG}}"
echo "Artifact name: ${{ env.ARTIFACT_NAME }}"
continue-on-error: true

- name: Compile Code
Expand All @@ -85,7 +101,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: EmuFlight-${{ env.VERSION }}-${{ github.run_number }}
name: ${{ env.ARTIFACT_NAME }}
path: obj/*.hex

# Upload to Bintray before .hex renames / only for tag
Expand Down

0 comments on commit 8e73765

Please sign in to comment.