Merge pull request #82 from intelligent-agent/eliasbakken-patch-1 #312
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
name: "Build Reflash" | |
on: | |
push: | |
branches: | |
- main | |
- enhancement/* | |
tags: | |
- 'v*' | |
env: | |
TERM: xterm-256color | |
jobs: | |
package: | |
runs-on: self-hosted | |
steps: | |
- name: Make filename | |
run: echo "VERSION=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV | |
- name: Use tag if tagged | |
if: startsWith(github.ref, 'refs/tags/') | |
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
- name: Use Node.js '18' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: install and build usb version | |
working-directory: ./client | |
run: | | |
npm ci | |
npm run build | |
- name: Make archive with version file | |
run: | | |
make build-go | |
- name: Make image | |
run: | | |
make docker | |
mv output/*.img.xz . | |
- name: Release if tagged | |
uses: ncipollo/release-action@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
allowUpdates: true | |
artifacts: "reflash-*.img.xz" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: true |