Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #202
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: Windows static build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: | |
- published | |
- prereleased | |
jobs: | |
build-x64: | |
runs-on: windows-2019 | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Load Qt from Cache | |
id: cache-qt | |
uses: actions/cache@v2 | |
with: | |
path: qt.7z | |
key: ${{ runner.os }}-qt-static | |
- uses: suisei-cn/actions-download-file@v1 | |
name: Download Qt | |
if: steps.cache-qt.outputs.cache-hit != 'true' | |
with: | |
url: "https://github.com/martinrotter/qt-minimalistic-builds/releases/download/5.15.2/qt-5.15.2-static-msvc2019-x86_64.7z" | |
target: "qt.7z" | |
- name: Save Qt to cache | |
uses: actions/cache@v2 | |
if: steps.cache-qt.outputs.cache-hit != 'true' | |
with: | |
path: qt.7z | |
key: ${{ runner.os }}-qt-static | |
- name: Extract Qt | |
run: 7z x ./qt.7z | |
- name: Install Qt | |
run: echo "D:\a\DDCToolbox\DDCToolbox\qt-5.15.2-static-msvc2019-x86_64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Build (x64) | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
cd D:\a\DDCToolbox\DDCToolbox | |
qmake DDCToolbox.pro "CONFIG += CI" "CONFIG += static" "CONFIG += no_tests" | |
nmake release | |
- name: Sign executable (x64) | |
uses: GabrielAcostaEngler/signtool-code-sign@v1.0.2 | |
with: | |
certificate: ${{ secrets.SIGN_CERTIFICATE }} | |
cert-password: ${{ secrets.SIGN_PASSWORD }} | |
cert-sha1: 048de957759a1837a967e61b8c97c442f7b9ec24 | |
folder: src/release | |
timestamp-server: http://timestamp.digicert.com | |
- name: Upload artifacts (x64) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: DDCToolbox_Portable_win64 | |
path: src/release/DDCToolbox.exe | |
make-nsis-installer: | |
runs-on: windows-latest | |
needs: [build-x64] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Prepare version information (1/3) | |
uses: oprypin/find-latest-tag@v1 | |
with: | |
repository: ThePBone/DDCToolbox | |
releases-only: true | |
id: last_release | |
- name: Prepare version information (2/3) | |
uses: benjlevesque/short-sha@v1.2 | |
id: short-sha | |
with: | |
length: 6 | |
- name: Prepare version information (3/3) | |
run: echo '::set-output name=version::${{steps.last_release.outputs.tag}}-${{steps.short-sha.outputs.sha}}' | |
id: version | |
# Make x64 installer | |
- name: Download artifact (x64) | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
name: DDCToolbox_Portable_win64 | |
- name: Create nsis installer (x64) | |
uses: joncloud/makensis-action@v3.3 | |
with: | |
script-file: "install.nsi" | |
arguments: "-DBASE_DIR=\"D:\\a\\DDCToolbox\\DDCToolbox\" -DPRODUCT_VERSION=\"${{steps.version.outputs.version}}\" -DPRODUCT_ARCH=\"64bit\"" | |
- name: Sign installer (x64) | |
uses: GabrielAcostaEngler/signtool-code-sign@v1.0.2 | |
with: | |
certificate: ${{ secrets.SIGN_CERTIFICATE }} | |
cert-password: ${{ secrets.SIGN_PASSWORD }} | |
cert-sha1: 048de957759a1837a967e61b8c97c442f7b9ec24 | |
folder: . | |
timestamp-server: http://timestamp.digicert.com | |
- name: Rename artifact (x64) | |
run: ren DDCToolbox_Setup_64bit_${{steps.version.outputs.version}}.exe DDCToolbox_Setup_win64_${{steps.version.outputs.version}}.exe | |
- name: Upload artifact (x64) | |
uses: actions/upload-artifact@v2.2.2 | |
with: | |
name: DDCToolbox_Setup_win64_${{steps.version.outputs.version}}.exe | |
path: DDCToolbox_Setup_win64_${{steps.version.outputs.version}}.exe | |
publish-nightly: | |
runs-on: ubuntu-latest | |
needs: [build-x64, make-nsis-installer] | |
steps: | |
- name: Prepare version information (1/3) | |
uses: oprypin/find-latest-tag@v1 | |
with: | |
repository: ThePBone/DDCToolbox | |
releases-only: true | |
id: last_release | |
- name: Prepare version information (2/3) | |
uses: benjlevesque/short-sha@v1.2 | |
id: short-sha | |
with: | |
length: 6 | |
- name: Prepare version information (3/3) | |
run: echo '::set-output name=version::${{steps.last_release.outputs.tag}}-${{steps.short-sha.outputs.sha}}' | |
id: version | |
- name: Download setup artifact (x64) | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
name: DDCToolbox_Setup_win64_${{steps.version.outputs.version}}.exe | |
- name: Download portable artifact (x64) | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
name: DDCToolbox_Portable_win64 | |
- name: Rename portable artifact (x64) | |
run: mv DDCToolbox.exe DDCToolbox_Portable_win64_${{steps.version.outputs.version}}.exe | |
- name: Upload setup artifact to nightly server (x64) | |
uses: wlixcc/SFTP-Deploy-Action@v1.0 | |
with: | |
username: 'tim' | |
server: 'local.timschneeberger.me' | |
port: 22 | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
local_path: './DDCToolbox_Setup_win64_${{steps.version.outputs.version}}.exe' | |
remote_path: '/srv/http/nightly.timschneeberger.me/ddctoolbox-win/' | |
args: '-o ConnectTimeout=5' | |
- name: Upload portable artifact to nightly server (x64) | |
uses: wlixcc/SFTP-Deploy-Action@v1.0 | |
with: | |
username: 'tim' | |
server: 'local.timschneeberger.me' | |
port: 22 | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
local_path: './DDCToolbox_Portable_win64_${{steps.version.outputs.version}}.exe' | |
remote_path: '/srv/http/nightly.timschneeberger.me/ddctoolbox-win/' | |
args: '-o ConnectTimeout=5' | |
attach-to-release: | |
runs-on: windows-latest | |
needs: [make-nsis-installer] | |
if: github.event_name == 'release' | |
steps: | |
- name: Prepare version information (1/3) | |
uses: oprypin/find-latest-tag@v1 | |
with: | |
repository: ThePBone/DDCToolbox | |
releases-only: true | |
id: last_release | |
- name: Prepare version information (2/3) | |
uses: benjlevesque/short-sha@v1.2 | |
id: short-sha | |
with: | |
length: 6 | |
- name: Prepare version information (3/3) | |
run: echo '::set-output name=version::${{steps.last_release.outputs.tag}}-${{steps.short-sha.outputs.sha}}' | |
id: version | |
- name: Download setup artifact (x64) | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
name: DDCToolbox_Setup_win64_${{steps.version.outputs.version}}.exe | |
- name: Download portable artifact (x64) | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
name: DDCToolbox_Portable_win64 | |
- name: Rename portable artifact (x64) | |
run: ren DDCToolbox.exe DDCToolbox_Portable_win64_${{steps.version.outputs.version}}.exe | |
- uses: AButler/upload-release-assets@v2.0 | |
with: | |
files: '*.exe' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} |