Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #200
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: Linux builds | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: | |
- published | |
- prereleased | |
jobs: | |
build-amd64: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Install dependencies | |
run: | | |
sudo apt update -qq | |
sudo apt install lftp qtbase5-dev qt5-default qttools5-dev-tools | |
- name: Initialize project | |
run: qmake DDCToolbox.pro "CONFIG += CI" "CONFIG += no_tests" | |
- name: Build | |
run: | | |
make | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: DDCToolbox_Portable_linux64 | |
path: src/DDCToolbox | |
build-deb-amd64: | |
runs-on: ubuntu-20.04 | |
needs: [build-amd64] | |
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/[email protected] | |
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 artifact | |
uses: actions/[email protected] | |
with: | |
name: DDCToolbox_Portable_linux64 | |
- name: Build DEB package | |
run: | | |
chmod +x ./deployment/build_deb_package.sh | |
./deployment/build_deb_package.sh ${{steps.version.outputs.version}} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ddctoolbox_${{steps.version.outputs.version}}_linux64.deb | |
path: ddctoolbox_${{steps.version.outputs.version}}_linux64.deb | |
publish-nightly: | |
runs-on: ubuntu-latest | |
needs: [build-amd64, build-deb-amd64] | |
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/[email protected] | |
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 portable artifact | |
uses: actions/[email protected] | |
with: | |
name: DDCToolbox_Portable_linux64 | |
- name: Download package artifact | |
uses: actions/[email protected] | |
with: | |
name: ddctoolbox_${{steps.version.outputs.version}}_linux64.deb | |
- name: Rename portable artifact | |
run: mv DDCToolbox ddctoolbox_${{steps.version.outputs.version}}_linux64.bin | |
- name: Upload binary to nightly server | |
uses: wlixcc/[email protected] | |
with: | |
username: 'tim' | |
server: 'local.timschneeberger.me' | |
port: 22 | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
local_path: './ddctoolbox_${{steps.version.outputs.version}}_linux64.bin' | |
remote_path: '/srv/http/nightly.timschneeberger.me/ddctoolbox-linux/' | |
args: '-o ConnectTimeout=5' | |
- name: Upload deb package to nightly server | |
uses: wlixcc/[email protected] | |
with: | |
username: 'tim' | |
server: 'local.timschneeberger.me' | |
port: 22 | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
local_path: './ddctoolbox_${{steps.version.outputs.version}}_linux64.deb' | |
remote_path: '/srv/http/nightly.timschneeberger.me/ddctoolbox-linux/' | |
args: '-o ConnectTimeout=5' | |
attach-to-release: | |
runs-on: ubuntu-latest | |
needs: [build-deb-amd64] | |
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/[email protected] | |
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 package artifact | |
uses: actions/[email protected] | |
with: | |
name: ddctoolbox_${{steps.version.outputs.version}}_linux64.deb | |
- uses: AButler/[email protected] | |
with: | |
files: '*.deb' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
update-ppa: | |
if: github.event_name == 'release' | |
runs-on: ubuntu-latest | |
needs: [build-deb-amd64] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: 'ThePBone/PPA-Repository' | |
token: ${{ secrets.REPO_AUTH_TOKEN }} | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 | |
- name: Prepare version information (1/3) | |
uses: oprypin/find-latest-tag@v1 | |
with: | |
repository: ThePBone/DDCToolbox | |
releases-only: false | |
id: last_release | |
- name: Prepare version information (2/3) | |
uses: benjlevesque/[email protected] | |
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 package artifact | |
uses: actions/[email protected] | |
with: | |
name: ddctoolbox_${{steps.version.outputs.version}}_linux64.deb | |
- name: Import GPG key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v4 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
- name: GPG user IDs | |
run: | | |
echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}" | |
echo "keyid: ${{ steps.import_gpg.outputs.keyid }}" | |
echo "name: ${{ steps.import_gpg.outputs.name }}" | |
echo "email: ${{ steps.import_gpg.outputs.email }}" | |
- name: Update packages | |
run: | | |
sudo apt install dpkg-dev apt-utils | |
export EMAIL="[email protected]" | |
dpkg-scanpackages --multiversion . > Packages | |
gzip -k -f Packages | |
apt-ftparchive release . > Release | |
gpg --default-key "${EMAIL}" -abs -o - Release > Release.gpg | |
gpg --default-key "${EMAIL}" --clearsign -o - Release > InRelease | |
- name: Commit | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Tim Schneeberger" | |
git add . | |
git commit -m "Update DDCToolbox packages" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.REPO_AUTH_TOKEN }} | |
repository: ThePBone/PPA-Repository | |
force: true |