-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding short hash to artifact filename except macos.
- Loading branch information
Showing
1 changed file
with
58 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,19 +32,19 @@ jobs: | |
- name: Read version from file | ||
id: read_version | ||
run: | | ||
if [ "${{github.ref_type}}" == "tag" ]; then | ||
if [ "${{ github.ref_type }}" == "tag" ]; then | ||
VERSION=${{ github.ref_name }} | ||
else | ||
SHORT_HASH="" | ||
else | ||
MAJOR_MINOR=$(cut -d. -f1-2 VERSION) | ||
VERSION="${MAJOR_MINOR}.99" | ||
# Get the short hash of the current commit | ||
SHORT_HASH=$(echo ${{ github.sha }} | cut -c1-7) | ||
fi | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
# Get the short hash of the current commit | ||
SHORT_HASH=$(git rev-parse --short=8 HEAD) | ||
echo "SHORT_HASH=$SHORT_HASH" >> $GITHUB_ENV | ||
echo "short_hash=$SHORT_HASH" >> $GITHUB_OUTPUT | ||
|
@@ -63,10 +63,14 @@ jobs: | |
submodules: recursive | ||
|
||
- name: Set version environment variable | ||
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
run: | | ||
echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" >> $GITHUB_ENV | ||
- name: Print version | ||
run: echo "Qucs-S version is ${{ env.VERSION }}" | ||
- name: Print version and hash | ||
run: | | ||
echo "Qucs-S version is ${{ env.VERSION }}" | ||
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}" | ||
- name: Install Dependencies | ||
run: | | ||
|
@@ -106,10 +110,14 @@ jobs: | |
submodules: recursive | ||
|
||
- name: Set version environment variable | ||
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
run: | | ||
echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" >> $GITHUB_ENV | ||
- name: Print version | ||
run: echo "Qucs-S version is ${{ env.VERSION }}" | ||
- name: Print version and hash | ||
run: | | ||
echo "Qucs-S version is ${{ env.VERSION }}" | ||
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}" | ||
- name: Install Dependencies | ||
run: | | ||
|
@@ -161,13 +169,13 @@ jobs: | |
--plugin=qt --output appimage | ||
rm linuxdeploy-x86_64.AppImage | ||
rm linuxdeploy-plugin-qt-x86_64.AppImage | ||
mv *.AppImage ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64.AppImage | ||
mv *.AppImage ${{ env.APP_NAME }}-${{env.VERSION}}-${{env.SHORT_HASH}}-linux-x86_64.AppImage | ||
- name: 'Upload artifact: AppImage' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64 | ||
path: ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64.AppImage | ||
name: ${{ env.APP_NAME }}-${{env.VERSION}}-${{env.SHORT_HASH}}-linux-x86_64 | ||
path: ${{ env.APP_NAME }}-${{env.VERSION}}-${{env.SHORT_HASH}}-linux-x86_64.AppImage | ||
|
||
|
||
build-mac-intel: | ||
|
@@ -181,10 +189,14 @@ jobs: | |
xcode-version: latest-stable | ||
|
||
- name: Set version environment variable | ||
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
run: | | ||
echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" >> $GITHUB_ENV | ||
- name: Print version | ||
run: echo "Qucs-S version is ${{ env.VERSION }}" | ||
- name: Print version and hash | ||
run: | | ||
echo "Qucs-S version is ${{ env.VERSION }}" | ||
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}" | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -273,10 +285,14 @@ jobs: | |
xcode-version: latest-stable | ||
|
||
- name: Set version environment variable | ||
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
run: | | ||
echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" >> $GITHUB_ENV | ||
- name: Print version | ||
run: echo "Qucs-S version is ${{ env.VERSION }}" | ||
- name: Print version and hash | ||
run: | | ||
echo "Qucs-S version is ${{ env.VERSION }}" | ||
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}" | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -370,10 +386,12 @@ jobs: | |
- name: Set version environment variable | ||
run: | | ||
echo "VERSION=${{ needs.setup.outputs.version }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
- name: Print version | ||
- name: Print version and hash | ||
run: | | ||
echo "Qucs-S version is ${{ env.VERSION }}" | ||
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}" | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -430,10 +448,13 @@ jobs: | |
shell: pwsh | ||
run: | | ||
echo "VERSION=${{ needs.setup.outputs.version }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
- name: Print version | ||
- name: Print version and hash | ||
shell: pwsh | ||
run: echo "Qucs-S version is ${{ env.VERSION }}" | ||
run: | | ||
echo "Qucs-S version is ${{ env.VERSION }}" | ||
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}" | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -514,26 +535,26 @@ jobs: | |
mkdir -p build/qucs-suite/misc | ||
cp -rf contrib/InnoSetup/misc build/qucs-suite/ | ||
cd build/qucs-suite | ||
zip -r ../../${{ env.APP_NAME }}-${{ env.VERSION }}-win64.zip ./bin ./share ./lib ./misc | ||
zip -r ../../${{ env.APP_NAME }}-${{ env.VERSION }}-${{ env.SHORT_HASH }}-win64.zip ./bin ./share ./lib ./misc | ||
cd ../.. | ||
- name: Compile .ISS to .EXE Installer | ||
uses: Minionguyjpro/[email protected].4 | ||
uses: Minionguyjpro/[email protected].5 | ||
with: | ||
path: contrib/InnoSetup/qucs.iss | ||
options: /Qp /O"${{github.workspace}}" /DAPPNAME=${{ env.APP_NAME }} /DRELEASE="${{ env.VERSION }}" | ||
options: /Qp /O"${{github.workspace}}" /DAPPNAME=${{ env.APP_NAME }} /DRELEASE="${{ env.VERSION }}-${{ env.SHORT_HASH }}" | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.APP_NAME }}-${{ env.VERSION }}-win64 | ||
path: ${{ env.APP_NAME }}-${{ env.VERSION }}-win64.zip | ||
name: ${{ env.APP_NAME }}-${{ env.VERSION }}-${{ env.SHORT_HASH }}-win64 | ||
path: ${{ env.APP_NAME }}-${{ env.VERSION }}-${{ env.SHORT_HASH }}-win64.zip | ||
|
||
- name: Upload exe artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.APP_NAME }}-${{ env.VERSION }}-setup | ||
path: ${{ env.APP_NAME }}-${{ env.VERSION }}-setup.exe | ||
name: ${{ env.APP_NAME }}-${{ env.VERSION }}-${{ env.SHORT_HASH }}-setup | ||
path: ${{ env.APP_NAME }}-${{ env.VERSION }}-${{ env.SHORT_HASH }}-setup.exe | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
|
@@ -544,10 +565,14 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Set version environment variable | ||
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
run: | | ||
echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV | ||
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" >> $GITHUB_ENV | ||
- name: Print version | ||
run: echo "Qucs-S version is ${{ env.VERSION }}" | ||
- name: Print version and hash | ||
run: | | ||
echo "Qucs-S version is ${{ env.VERSION }}" | ||
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}" | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v4 | ||
|