Skip to content

Commit

Permalink
Update Build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bvernoux authored Oct 31, 2023
1 parent 9d5f8b7 commit 0f94703
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,20 @@ jobs:
- name: Get build timestamp
id: id_date
shell: bash
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_STATE
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT

- name: Get app version
- name: Get app version + timestamp
id: id_version
shell: bash
run: |
app_major_minor_patch=`grep -oP '(?<=VERSION = )[0-9.]+' Makefile`
echo "app_version=v$app_major_minor_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
run: echo "app_version=$(git describe --tags HEAD)-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT

- name: Build app
shell: bash
run: |
make
- name: Upload artifact
env:
APP_VERSION: "${{steps.id_version.outputs.app_version}}"
uses: actions/upload-artifact@v3
with:
name: wch-ch56x-isp-Ubuntu-${{env.APP_VERSION}}
name: wch-ch56x-isp-Ubuntu-${{steps.id_version.outputs.app_version}}
path: ./

wch-isp_Windows:
Expand All @@ -56,21 +52,19 @@ jobs:

- name: Get build timestamp
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_STATE
shell: bash
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT

- name: Get app version + timestamp
id: id_version
run: echo "app_version=$(git describe --tags HEAD)-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT

- name: Get app version
id: id_version
run: |
app_major_minor_patch=`grep -oP '(?<=VERSION = )[0-9.]+' Makefile`
echo "app_version=v$app_major_minor_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build app
run: |
mingw32-make
cp /mingw64/bin/libusb-1.0.dll ./
- name: Upload artifact
env:
APP_VERSION: "${{steps.id_version.outputs.app_version}}"
uses: actions/upload-artifact@v3
with:
name: wch-ch56x-isp-Windows-${{env.APP_VERSION}}
name: wch-ch56x-isp-Windows-${{steps.id_version.outputs.app_version}}
path: ./

0 comments on commit 0f94703

Please sign in to comment.