Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
ci: Changed release naming and using zip archive
Browse files Browse the repository at this point in the history
- Use same naming pattern as the other YIO modules.
- Zip archive to compress release artifacts
- Fixed version handling: git history is required
  • Loading branch information
Markus Zehnder authored and Markus Zehnder committed May 9, 2020
1 parent 68203e0 commit c597305
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# History of 500 should be more than enough to calculate commit count since last release tag.
fetch-depth: 500

- name: Fetch all tags to determine version
run: |
Expand All @@ -34,9 +37,9 @@
echo ${{ env.VERSION }} > version.txt
- name: Archive production artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
with:
name: YIO-Web-configurator
name: YIO-web-configurator
path: dist

release:
Expand All @@ -48,19 +51,20 @@
steps:
- run: mkdir release
- name: Download release artifact
uses: actions/download-artifact@v1
uses: actions/download-artifact@v2
with:
name: YIO-Web-configurator
path: ./release
name: YIO-web-configurator
path: ./dist

- name: Get artifact version
run: |
echo "::set-env name=APP_VERSION::$(cat release/version.txt)"
echo "::set-env name=APP_VERSION::$(cat dist/version.txt)"
echo "::set-env name=TIMESTAMP::$(date +"%Y%m%d_%H%M%S")"
- name: Create GitHub release archives
- name: Create GitHub release archive
run: |
tar cvf YIO-Web-configurator-${{ env.APP_VERSION }}-${{ env.TIMESTAMP }}-release.tar -C release .
cd dist
zip -r ../YIO-web-configurator-${{ env.APP_VERSION }}.zip .
- name: Create Pre-Release ${{ env.VERSION }}
uses: "marvinpinto/action-automatic-releases@latest"
Expand All @@ -71,7 +75,7 @@
prerelease: true
title: "Development Build ${{ env.APP_VERSION }}"
files: |
*.tar
*.zip
- name: Create Release ${{ env.VERSION }}
uses: "marvinpinto/action-automatic-releases@latest"
Expand All @@ -80,4 +84,4 @@
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
*.tar
*.zip

0 comments on commit c597305

Please sign in to comment.