From 490a3c2dd274593767ca5b5c63de6e5c736448fb Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 17:27:24 +0100 Subject: [PATCH 01/26] set distributionManagement repos to local --- pom.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8240cbb0a60..34254c4dd14 100644 --- a/pom.xml +++ b/pom.xml @@ -869,12 +869,14 @@ maven.cyberduck.io-release - s3://repo.maven.cyberduck.io/releases/ + + file://${user.home} default maven.cyberduck.io-snapshot - s3://repo.maven.cyberduck.io/snapshots/ + file://${user.home} github-pages-site From 7c6015a7e6c02d28ac68622aa2eebbe62b7474d2 Mon Sep 17 00:00:00 2001 From: RaveenaRamany <61196071+RaveenaRamany@users.noreply.github.com> Date: Sun, 10 Dec 2023 18:24:35 +0100 Subject: [PATCH 02/26] Add workflow cyberduck-release-windows --- .../workflows/cyberduck-release-windows.yml | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 .github/workflows/cyberduck-release-windows.yml diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml new file mode 100644 index 00000000000..47308c1c3f7 --- /dev/null +++ b/.github/workflows/cyberduck-release-windows.yml @@ -0,0 +1,139 @@ +name: cyberduck-release-windows +on: + workflow_dispatch: + inputs: + GIT_TAG: + required: false +env: + AWS_ACCESS_KEY_DEPLOYMENT: "${{ secrets.52D57BB0_E2E1_46D3_A431_13B5E39E1334_AWS_ACCESS_KEY_DEPLOYMENT }}" + AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets.52D57BB0_E2E1_46D3_A431_13B5E39E1334_AWS_SECRET_KEY_DEPLOYMENT }}" + RACKSPACE_USER: "${{ secrets.9FBE3DFE_89F3_4A37_BD20_42C301B6EB68_RACKSPACE_USER }}" + RACKSPACE_PASSWORD: "${{ secrets.9FBE3DFE_89F3_4A37_BD20_42C301B6EB68_RACKSPACE_PASSWORD }}" +# # This item has no matching transformer +# org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper: +# plugin: config-file-provider@3.11.1 +# managedFiles: +# - org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile: +# fileId: 05db0dbd-e0f0-4eb5-881b-524c43e54802 +# targetLocation: "$WORKSPACE/www/update/private.pem" +# replaceTokens: 'false' +# # TimestamperBuildWrapper was not converted because the behavior is available by default in GitHub Actions and/or it is not configurable +# fileId: 5d9d075e-ca4f-4679-ac9b-0846bc8f53f4 +# targetLocation: "$WORKSPACE/settings.xml" +jobs: + build: + runs-on: + - self-hosted + - windows + steps: + - name: clean workspace + shell: ruby {0} + run: |- + require "fileutils" + Dir.chdir(ENV["GITHUB_WORKSPACE"]) do + paths = Dir.glob(["**/*"]) + paths -= Dir.glob([".git/**", ".repository/**"]) + paths.each do |path| + File.delete(path) if File.file?(path) + FileUtils.rm_rf(path) if File.directory?(path) + end + end + - name: checkout + uses: actions/checkout@v4.1.0 + - name: Set up JDK 1.11 + uses: actions/setup-java@v4.0.0 + with: + distribution: zulu + java-version: '1.11' + settings-path: "${{ github.workspace }}" + - name: Run maven + run: mvn clean deploy --settings $WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=" + - name: run batch command + shell: cmd + run: FOR %%c in ("%WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload rackspace:/cdn.cyberduck.ch/ "%%c" --username %RACKSPACE_USER% --password %RACKSPACE_PASSWORD% --retry --quiet --existing overwrite --region DFW + - name: run batch command + shell: cmd + run: FOR %%c in ("%WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload s3:/release.cyberduck.io/ "%%c" --username %AWS_ACCESS_KEY_DEPLOYMENT% --password %AWS_SECRET_KEY_DEPLOYMENT% --retry --quiet --existing overwrite --region us-east-1 + - name: Upload Artifacts + uses: actions/upload-artifact@v3.1.3 + if: always() + with: + path: |- + windows\target\release\*.exe + windows\target\release\*.msi + windows\target\release\*.appx + !**/*~ + !**/#*# + !**/.#* + !**/%*% + !**/._* + !**/CVS + !**/CVS/** + !**/.cvsignore + !**/SCCS + !**/SCCS/** + !**/vssver.scc + !**/.svn + !**/.svn/** + !**/.DS_Store + !**/.git + !**/.git/** + !**/.gitattributes + !**/.gitignore + !**/.gitmodules + !**/.hg + !**/.hg/** + !**/.hgignore + !**/.hgsub + !**/.hgsubstate + !**/.hgtags + !**/.bzr + !**/.bzr/** + !**/.bzrignore +# # Fingerprinter was not converted because the behavior is available by default in GitHub Actions and/or it is not configurable +# # Mailer plugin was not converted because GitHub Actions will email the actor after failed build and does not support emailing a list of recipients + # Ensure parameter if_key_exists is set correctly + - name: Install SSH key + uses: shimataro/ssh-key-action@v2.6.1 + with: + key: "${{ secrets.VERSION_CYBERDUCK_IO_SSH_KEY }}" + name: id_rsa-version_cyberduck_io + known_hosts: "${{ secrets.VERSION_CYBERDUCK_IO_KNOWN_HOSTS }}" + if_key_exists: fail + config: | + Host VERSION_CYBERDUCK_IO + HostName ${{ secrets.VERSION_CYBERDUCK_IO_HOST_NAME }} + User ${{ secrets.VERSION_CYBERDUCK_IO_USER }} + IdentityFile ~/.ssh/id_rsa-version_cyberduck_io + if: always() + - name: setup file transfer file + uses: actions/github-script@v7.0.0 + with: + script: |- + const fs = require('fs').promises + const path = require('path') + const patterns = "windows/target/update/changelog.*,!**/*~,!**/#*#,!**/.#*,!**/%*%,!**/._*,!**/CVS,!**/CVS/**,!**/.cvsignore,!**/SCCS,!**/SCCS/**,!**/vssver.scc,!**/.svn,!**/.svn/**,!**/.DS_Store,!**/.git,!**/.git/**,!**/.gitattributes,!**/.gitignore,!**/.gitmodules,!**/.hg,!**/.hg/**,!**/.hgignore,!**/.hgsub,!**/.hgsubstate,!**/.hgtags,!**/.bzr,!**/.bzr/**,!**/.bzrignore" + const globber = await glob.create(patterns.replace(/,/g, "\n")) + const files = [] + for await (const file of globber.globGenerator()) { + if ((await fs.lstat(file)).isDirectory()) continue + files.push(path.relative(process.cwd(), file)) + } + fs.writeFile("version_cyberduck_io-transfer.txt", files.join("\n"), (err) => {}) + if: always() + - name: run file transfers + run: |- + ssh VERSION_CYBERDUCK_IO 'mkdir -p windows' + tar -cvf version_cyberduck_io-transfer.tar --files-from version_cyberduck_io-transfer.txt + scp version_cyberduck_io-transfer.tar VERSION_CYBERDUCK_IO: + ssh VERSION_CYBERDUCK_IO 'tar -xvf version_cyberduck_io-transfer.tar -C windows && rm version_cyberduck_io-transfer.tar' + if: always() +# # This item has no matching transformer +# - uses: hudson.tasks.BuildTrigger +# with: +# childProjects: cyberduck-release-windows-chocolatey +# threshold: +# name: SUCCESS +# ordinal: '0' +# color: BLUE +# completeBuild: 'true' From 87952978cea7e919985062dffa89ae293334ec7e Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 18:59:10 +0100 Subject: [PATCH 03/26] Fix missing transforms --- .../workflows/cyberduck-release-windows.yml | 56 +++++++++++++------ 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 47308c1c3f7..b8690b44314 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -9,17 +9,7 @@ env: AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets.52D57BB0_E2E1_46D3_A431_13B5E39E1334_AWS_SECRET_KEY_DEPLOYMENT }}" RACKSPACE_USER: "${{ secrets.9FBE3DFE_89F3_4A37_BD20_42C301B6EB68_RACKSPACE_USER }}" RACKSPACE_PASSWORD: "${{ secrets.9FBE3DFE_89F3_4A37_BD20_42C301B6EB68_RACKSPACE_PASSWORD }}" -# # This item has no matching transformer -# org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper: -# plugin: config-file-provider@3.11.1 -# managedFiles: -# - org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile: -# fileId: 05db0dbd-e0f0-4eb5-881b-524c43e54802 -# targetLocation: "$WORKSPACE/www/update/private.pem" -# replaceTokens: 'false' -# # TimestamperBuildWrapper was not converted because the behavior is available by default in GitHub Actions and/or it is not configurable -# fileId: 5d9d075e-ca4f-4679-ac9b-0846bc8f53f4 -# targetLocation: "$WORKSPACE/settings.xml" + jobs: build: runs-on: @@ -40,20 +30,50 @@ jobs: end - name: checkout uses: actions/checkout@v4.1.0 - - name: Set up JDK 1.11 + - name: Copy Sparkle Updater Private Key (DSA) + shell: powershell + env: + SPARKLE_UPDATER_PK: ${{ secrets.win_sparkle_updater_private_key }} + run: ${env:SPARKLE_UPDATER_PK} > $GITHUB_WORKSPACE\www\update\private.pem + + - name: Set up JDK 17 uses: actions/setup-java@v4.0.0 with: - distribution: zulu - java-version: '1.11' + distribution: 'temurin' + java-version: '17' settings-path: "${{ github.workspace }}" + - name: Generate maven settings.xml + uses: s4u/maven-settings-action@v2.8.0 + with: + servers: | + [{ + "id": "maven.iterate.ch-release", + "username": "AKIAI44PZB4OH5YGWFVA", + "password": "${{ secrets.maven_server_password }}", + }, + { + "id": "maven.iterate.ch-snapshot", + "username": "AKIAI44PZB4OH5YGWFVA", + "password": "${{ secrets.maven_server_password }}", + }, + { + "id": "maven.cyberduck.io-release", + "username": "AKIAI44PZB4OH5YGWFVA", + "password": "${{ secrets.maven_server_password }}", + }, + { + "id": "maven.cyberduck.io-snapshot", + "username": "AKIAI44PZB4OH5YGWFVA", + "password": "${{ secrets.maven_server_password }}", + }] - name: Run maven - run: mvn clean deploy --settings $WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=" + run: mvn clean deploy --settings $GITHUB_WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=" - name: run batch command shell: cmd - run: FOR %%c in ("%WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload rackspace:/cdn.cyberduck.ch/ "%%c" --username %RACKSPACE_USER% --password %RACKSPACE_PASSWORD% --retry --quiet --existing overwrite --region DFW + run: FOR %%c in ("%GITHUB_WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload rackspace:/cdn.cyberduck.ch/ "%%c" --username %RACKSPACE_USER% --password %RACKSPACE_PASSWORD% --retry --quiet --existing overwrite --region DFW - name: run batch command shell: cmd - run: FOR %%c in ("%WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload s3:/release.cyberduck.io/ "%%c" --username %AWS_ACCESS_KEY_DEPLOYMENT% --password %AWS_SECRET_KEY_DEPLOYMENT% --retry --quiet --existing overwrite --region us-east-1 + run: FOR %%c in ("%GITHUB_WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload s3:/release.cyberduck.io/ "%%c" --username %AWS_ACCESS_KEY_DEPLOYMENT% --password %AWS_SECRET_KEY_DEPLOYMENT% --retry --quiet --existing overwrite --region us-east-1 - name: Upload Artifacts uses: actions/upload-artifact@v3.1.3 if: always() @@ -99,7 +119,7 @@ jobs: key: "${{ secrets.VERSION_CYBERDUCK_IO_SSH_KEY }}" name: id_rsa-version_cyberduck_io known_hosts: "${{ secrets.VERSION_CYBERDUCK_IO_KNOWN_HOSTS }}" - if_key_exists: fail + if_key_exists: replace # replace will allow us to update the ssh-key on an existing build config: | Host VERSION_CYBERDUCK_IO HostName ${{ secrets.VERSION_CYBERDUCK_IO_HOST_NAME }} From 5bdd6665827d4a51598866a45c67281cfabf5862 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 19:08:11 +0100 Subject: [PATCH 04/26] update Repository secrets --- .github/workflows/cyberduck-release-windows.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index b8690b44314..cf7fa0f13e4 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -33,7 +33,7 @@ jobs: - name: Copy Sparkle Updater Private Key (DSA) shell: powershell env: - SPARKLE_UPDATER_PK: ${{ secrets.win_sparkle_updater_private_key }} + SPARKLE_UPDATER_PK: ${{ secrets.WIN_SPARKLE_UPDATER_PRIVATE_KEY }} run: ${env:SPARKLE_UPDATER_PK} > $GITHUB_WORKSPACE\www\update\private.pem - name: Set up JDK 17 @@ -49,22 +49,22 @@ jobs: [{ "id": "maven.iterate.ch-release", "username": "AKIAI44PZB4OH5YGWFVA", - "password": "${{ secrets.maven_server_password }}", + "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", }, { "id": "maven.iterate.ch-snapshot", "username": "AKIAI44PZB4OH5YGWFVA", - "password": "${{ secrets.maven_server_password }}", + "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", }, { "id": "maven.cyberduck.io-release", "username": "AKIAI44PZB4OH5YGWFVA", - "password": "${{ secrets.maven_server_password }}", + "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", }, { "id": "maven.cyberduck.io-snapshot", "username": "AKIAI44PZB4OH5YGWFVA", - "password": "${{ secrets.maven_server_password }}", + "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", }] - name: Run maven run: mvn clean deploy --settings $GITHUB_WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=" From 70e22c78f23e42af02bcf8660cac304764fbb68a Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 21:20:53 +0100 Subject: [PATCH 05/26] Fix secret names --- .github/workflows/cyberduck-release-windows.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index cf7fa0f13e4..0218988bcc1 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -5,10 +5,10 @@ on: GIT_TAG: required: false env: - AWS_ACCESS_KEY_DEPLOYMENT: "${{ secrets.52D57BB0_E2E1_46D3_A431_13B5E39E1334_AWS_ACCESS_KEY_DEPLOYMENT }}" - AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets.52D57BB0_E2E1_46D3_A431_13B5E39E1334_AWS_SECRET_KEY_DEPLOYMENT }}" - RACKSPACE_USER: "${{ secrets.9FBE3DFE_89F3_4A37_BD20_42C301B6EB68_RACKSPACE_USER }}" - RACKSPACE_PASSWORD: "${{ secrets.9FBE3DFE_89F3_4A37_BD20_42C301B6EB68_RACKSPACE_PASSWORD }}" + AWS_ACCESS_KEY_DEPLOYMENT: "${{ secrets.AWS_ACCESS_KEY_DEPLOYMENT }}" + AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets._AWS_SECRET_KEY_DEPLOYMENT }}" + RACKSPACE_USER: "${{ secrets.RACKSPACE_USER }}" + RACKSPACE_PASSWORD: "${{ secrets.RACKSPACE_PASSWORD }}" jobs: build: From b05f3eff959209cd01f6673e7576d2fdab3477e5 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 21:50:05 +0100 Subject: [PATCH 06/26] Change runner to github hosted windows runner --- .github/workflows/cyberduck-release-windows.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 0218988bcc1..02761db7f86 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -13,8 +13,7 @@ env: jobs: build: runs-on: - - self-hosted - - windows + - windows-latest steps: - name: clean workspace shell: ruby {0} From c7ad0442eb2b40a9c1788f194998e7f692c77ea4 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 21:55:47 +0100 Subject: [PATCH 07/26] Fix typo in secret name --- .github/workflows/cyberduck-release-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 02761db7f86..bd33589894e 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -6,7 +6,7 @@ on: required: false env: AWS_ACCESS_KEY_DEPLOYMENT: "${{ secrets.AWS_ACCESS_KEY_DEPLOYMENT }}" - AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets._AWS_SECRET_KEY_DEPLOYMENT }}" + AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets.AWS_SECRET_KEY_DEPLOYMENT }}" RACKSPACE_USER: "${{ secrets.RACKSPACE_USER }}" RACKSPACE_PASSWORD: "${{ secrets.RACKSPACE_PASSWORD }}" From f67f6ef1ffc344e34c25ea6fb872abd25c0db6fd Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 23:01:23 +0100 Subject: [PATCH 08/26] Add option for git tag --- .github/workflows/cyberduck-release-windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index bd33589894e..e2ddf9b3e36 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -29,6 +29,8 @@ jobs: end - name: checkout uses: actions/checkout@v4.1.0 + with: + ref: ${{ inputs.GIT_TAG }} - name: Copy Sparkle Updater Private Key (DSA) shell: powershell env: From 547c0b84d7b6e6195e0994936b8f3ef447300d8b Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 23:47:36 +0100 Subject: [PATCH 09/26] Fix WORKSPACE variable --- .github/workflows/cyberduck-release-windows.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index bd33589894e..fa47ad63e43 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -5,6 +5,7 @@ on: GIT_TAG: required: false env: + GITHUB_REPOSITORY: "${{ github.workspace }}\\${{ github.event.repository.name }}" AWS_ACCESS_KEY_DEPLOYMENT: "${{ secrets.AWS_ACCESS_KEY_DEPLOYMENT }}" AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets.AWS_SECRET_KEY_DEPLOYMENT }}" RACKSPACE_USER: "${{ secrets.RACKSPACE_USER }}" @@ -66,13 +67,13 @@ jobs: "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", }] - name: Run maven - run: mvn clean deploy --settings $GITHUB_WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=" + run: mvn clean deploy --settings $GITHUB_REPOSITORY/settings.xml -DskipTests -D"sparkle.feed=" - name: run batch command shell: cmd - run: FOR %%c in ("%GITHUB_WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload rackspace:/cdn.cyberduck.ch/ "%%c" --username %RACKSPACE_USER% --password %RACKSPACE_PASSWORD% --retry --quiet --existing overwrite --region DFW + run: FOR %%c in ("%GITHUB_REPOSITORY%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload rackspace:/cdn.cyberduck.ch/ "%%c" --username %RACKSPACE_USER% --password %RACKSPACE_PASSWORD% --retry --quiet --existing overwrite --region DFW - name: run batch command shell: cmd - run: FOR %%c in ("%GITHUB_WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload s3:/release.cyberduck.io/ "%%c" --username %AWS_ACCESS_KEY_DEPLOYMENT% --password %AWS_SECRET_KEY_DEPLOYMENT% --retry --quiet --existing overwrite --region us-east-1 + run: FOR %%c in ("%GITHUB_REPOSITORY%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload s3:/release.cyberduck.io/ "%%c" --username %AWS_ACCESS_KEY_DEPLOYMENT% --password %AWS_SECRET_KEY_DEPLOYMENT% --retry --quiet --existing overwrite --region us-east-1 - name: Upload Artifacts uses: actions/upload-artifact@v3.1.3 if: always() From 0689757e330247f1f2e01fcfac4bd48893b8a6e0 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 23:56:25 +0100 Subject: [PATCH 10/26] Fix sparkle updater certificate path --- .github/workflows/cyberduck-release-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 1b65197b52a..1224a3fd8bd 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -36,7 +36,7 @@ jobs: shell: powershell env: SPARKLE_UPDATER_PK: ${{ secrets.WIN_SPARKLE_UPDATER_PRIVATE_KEY }} - run: ${env:SPARKLE_UPDATER_PK} > $GITHUB_WORKSPACE\www\update\private.pem + run: ${env:SPARKLE_UPDATER_PK} > $GITHUB_REPOSITORY\www\update\private.pem - name: Set up JDK 17 uses: actions/setup-java@v4.0.0 From 67679c007882739073aed0933eb5ff84057beaa5 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Sun, 10 Dec 2023 23:59:38 +0100 Subject: [PATCH 11/26] Add quotes --- .github/workflows/cyberduck-release-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 1224a3fd8bd..45a0bab3e2a 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -36,7 +36,7 @@ jobs: shell: powershell env: SPARKLE_UPDATER_PK: ${{ secrets.WIN_SPARKLE_UPDATER_PRIVATE_KEY }} - run: ${env:SPARKLE_UPDATER_PK} > $GITHUB_REPOSITORY\www\update\private.pem + run: ${env:SPARKLE_UPDATER_PK} > "${GITHUB_REPOSITORY}\www\update\private.pem" - name: Set up JDK 17 uses: actions/setup-java@v4.0.0 From 60255dc6bf78eb7e94df30a9e1b8263e0083cd6f Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Mon, 11 Dec 2023 00:07:38 +0100 Subject: [PATCH 12/26] env test --- .github/workflows/cyberduck-release-windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 45a0bab3e2a..012be319c1e 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -5,7 +5,8 @@ on: GIT_TAG: required: false env: - GITHUB_REPOSITORY: "${{ github.workspace }}\\${{ github.event.repository.name }}" + GITHUB_REPOSITORY: "${{ github.workspace }}" +# GITHUB_REPOSITORY: "${{ github.workspace }}\\${{ github.event.repository.name }}" AWS_ACCESS_KEY_DEPLOYMENT: "${{ secrets.AWS_ACCESS_KEY_DEPLOYMENT }}" AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets.AWS_SECRET_KEY_DEPLOYMENT }}" RACKSPACE_USER: "${{ secrets.RACKSPACE_USER }}" From 5cbf6d675b0ed66b7b94b7ad69c8310413b3908b Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Mon, 11 Dec 2023 00:13:57 +0100 Subject: [PATCH 13/26] env test --- .github/workflows/cyberduck-release-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 012be319c1e..b384e61d989 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -37,7 +37,7 @@ jobs: shell: powershell env: SPARKLE_UPDATER_PK: ${{ secrets.WIN_SPARKLE_UPDATER_PRIVATE_KEY }} - run: ${env:SPARKLE_UPDATER_PK} > "${GITHUB_REPOSITORY}\www\update\private.pem" + run: ${env:SPARKLE_UPDATER_PK} > "${env:GITHUB_REPOSITORY}\www\update\private.pem" - name: Set up JDK 17 uses: actions/setup-java@v4.0.0 From 07fed6cdbb7274c660530bdf5a0f3566d84ac28b Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Mon, 11 Dec 2023 00:17:45 +0100 Subject: [PATCH 14/26] env test --- .github/workflows/cyberduck-release-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index b384e61d989..66886337793 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -37,7 +37,7 @@ jobs: shell: powershell env: SPARKLE_UPDATER_PK: ${{ secrets.WIN_SPARKLE_UPDATER_PRIVATE_KEY }} - run: ${env:SPARKLE_UPDATER_PK} > "${env:GITHUB_REPOSITORY}\www\update\private.pem" + run: ${env:SPARKLE_UPDATER_PK} > "${env:GITHUB_WORKSPACE}\www\update\private.pem" - name: Set up JDK 17 uses: actions/setup-java@v4.0.0 From 7a6faaaf3ca3b530a9901e460694194f6292ad57 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Mon, 11 Dec 2023 00:22:53 +0100 Subject: [PATCH 15/26] Fix environment variables --- .github/workflows/cyberduck-release-windows.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 66886337793..13db8da089c 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -5,8 +5,6 @@ on: GIT_TAG: required: false env: - GITHUB_REPOSITORY: "${{ github.workspace }}" -# GITHUB_REPOSITORY: "${{ github.workspace }}\\${{ github.event.repository.name }}" AWS_ACCESS_KEY_DEPLOYMENT: "${{ secrets.AWS_ACCESS_KEY_DEPLOYMENT }}" AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets.AWS_SECRET_KEY_DEPLOYMENT }}" RACKSPACE_USER: "${{ secrets.RACKSPACE_USER }}" @@ -70,13 +68,13 @@ jobs: "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", }] - name: Run maven - run: mvn clean deploy --settings $GITHUB_REPOSITORY/settings.xml -DskipTests -D"sparkle.feed=" + run: mvn clean deploy --settings $GITHUB_WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=" - name: run batch command shell: cmd - run: FOR %%c in ("%GITHUB_REPOSITORY%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload rackspace:/cdn.cyberduck.ch/ "%%c" --username %RACKSPACE_USER% --password %RACKSPACE_PASSWORD% --retry --quiet --existing overwrite --region DFW + run: FOR %%c in ("%GITHUB_WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload rackspace:/cdn.cyberduck.ch/ "%%c" --username %RACKSPACE_USER% --password %RACKSPACE_PASSWORD% --retry --quiet --existing overwrite --region DFW - name: run batch command shell: cmd - run: FOR %%c in ("%GITHUB_REPOSITORY%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload s3:/release.cyberduck.io/ "%%c" --username %AWS_ACCESS_KEY_DEPLOYMENT% --password %AWS_SECRET_KEY_DEPLOYMENT% --retry --quiet --existing overwrite --region us-east-1 + run: FOR %%c in ("%GITHUB_WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload s3:/release.cyberduck.io/ "%%c" --username %AWS_ACCESS_KEY_DEPLOYMENT% --password %AWS_SECRET_KEY_DEPLOYMENT% --retry --quiet --existing overwrite --region us-east-1 - name: Upload Artifacts uses: actions/upload-artifact@v3.1.3 if: always() From 9a129dd838770d30ee974215e561734e9bf7167b Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Mon, 11 Dec 2023 00:27:13 +0100 Subject: [PATCH 16/26] Fix maven-settings-action --- .github/workflows/cyberduck-release-windows.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 13db8da089c..8c1910af353 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -50,22 +50,22 @@ jobs: [{ "id": "maven.iterate.ch-release", "username": "AKIAI44PZB4OH5YGWFVA", - "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", + "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}" }, { "id": "maven.iterate.ch-snapshot", "username": "AKIAI44PZB4OH5YGWFVA", - "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", + "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}" }, { "id": "maven.cyberduck.io-release", "username": "AKIAI44PZB4OH5YGWFVA", - "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", + "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}" }, { "id": "maven.cyberduck.io-snapshot", "username": "AKIAI44PZB4OH5YGWFVA", - "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}", + "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}" }] - name: Run maven run: mvn clean deploy --settings $GITHUB_WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=" From e175cf739d2611f84aee8bff890e19a63f864470 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Mon, 11 Dec 2023 00:31:51 +0100 Subject: [PATCH 17/26] Fix maven settings.xml --- .github/workflows/cyberduck-release-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml index 8c1910af353..59edc75a500 100644 --- a/.github/workflows/cyberduck-release-windows.yml +++ b/.github/workflows/cyberduck-release-windows.yml @@ -68,7 +68,7 @@ jobs: "password": "${{ secrets.MAVEN_SERVER_PASSWORD }}" }] - name: Run maven - run: mvn clean deploy --settings $GITHUB_WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=" + run: mvn clean deploy --settings ${env:GITHUB_WORKSPACE}/settings.xml -DskipTests -D"sparkle.feed=" - name: run batch command shell: cmd run: FOR %%c in ("%GITHUB_WORKSPACE%\windows\target\release\Cyberduck-*") DO "C:\Program Files\Cyberduck CLI\duck.exe" --upload rackspace:/cdn.cyberduck.ch/ "%%c" --username %RACKSPACE_USER% --password %RACKSPACE_PASSWORD% --retry --quiet --existing overwrite --region DFW From 52633d0a9c4edc1930a4ce69e7799816f145db02 Mon Sep 17 00:00:00 2001 From: RaveenaRamany <61196071+RaveenaRamany@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:29:43 +0100 Subject: [PATCH 18/26] Add workflow cyberduck-release-windows-chocolatey --- .../cyberduck-release-windows-chocolatey.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/cyberduck-release-windows-chocolatey.yml diff --git a/.github/workflows/cyberduck-release-windows-chocolatey.yml b/.github/workflows/cyberduck-release-windows-chocolatey.yml new file mode 100644 index 00000000000..a4a9f80c573 --- /dev/null +++ b/.github/workflows/cyberduck-release-windows-chocolatey.yml @@ -0,0 +1,17 @@ +name: cyberduck-release-windows-chocolatey +on: + workflow_dispatch: +env: +# # TimestamperBuildWrapper was not converted because the behavior is available by default in GitHub Actions and/or it is not configurable +jobs: + build: + runs-on: + - self-hosted + - windows + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + - name: run batch command + shell: cmd + run: FOR %%c in ("%WORKSPACE%\..\cyberduck-release-windows\windows\target\release\cyberduck.*.nupkg") DO C:\ProgramData\chocolatey\bin\cpush --verbose --api-key 195755fd-123d-4325-a497-036ee455c54e %%c +# # Mailer plugin was not converted because GitHub Actions will email the actor after failed build and does not support emailing a list of recipients From dc9cbb6f553153f1d4c8e60443d82e8e152e0372 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Mon, 11 Dec 2023 13:44:34 +0100 Subject: [PATCH 19/26] comment env-key --- .github/workflows/cyberduck-release-windows-chocolatey.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cyberduck-release-windows-chocolatey.yml b/.github/workflows/cyberduck-release-windows-chocolatey.yml index a4a9f80c573..23bc7cde010 100644 --- a/.github/workflows/cyberduck-release-windows-chocolatey.yml +++ b/.github/workflows/cyberduck-release-windows-chocolatey.yml @@ -1,7 +1,7 @@ name: cyberduck-release-windows-chocolatey on: workflow_dispatch: -env: +#env: # # TimestamperBuildWrapper was not converted because the behavior is available by default in GitHub Actions and/or it is not configurable jobs: build: From 4750959046537676c9f08371fadd10b4e6950147 Mon Sep 17 00:00:00 2001 From: RaveenaRamany <61196071+RaveenaRamany@users.noreply.github.com> Date: Tue, 12 Dec 2023 18:25:01 +0100 Subject: [PATCH 20/26] Update cyberduck-release-windows-chocolatey.yml Added Secret API Key --- .github/workflows/cyberduck-release-windows-chocolatey.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cyberduck-release-windows-chocolatey.yml b/.github/workflows/cyberduck-release-windows-chocolatey.yml index 23bc7cde010..321b17cf839 100644 --- a/.github/workflows/cyberduck-release-windows-chocolatey.yml +++ b/.github/workflows/cyberduck-release-windows-chocolatey.yml @@ -1,7 +1,8 @@ name: cyberduck-release-windows-chocolatey on: workflow_dispatch: -#env: +env: + CHOCOLATEY_API: "${{ secrets.CHOCOLATEY_API_KEY }}" # # TimestamperBuildWrapper was not converted because the behavior is available by default in GitHub Actions and/or it is not configurable jobs: build: @@ -13,5 +14,7 @@ jobs: uses: actions/checkout@v4.1.0 - name: run batch command shell: cmd - run: FOR %%c in ("%WORKSPACE%\..\cyberduck-release-windows\windows\target\release\cyberduck.*.nupkg") DO C:\ProgramData\chocolatey\bin\cpush --verbose --api-key 195755fd-123d-4325-a497-036ee455c54e %%c + run: FOR %%c in ("%WORKSPACE%\..\cyberduck-release-windows\windows\target\release\cyberduck.*.nupkg") DO C:\ProgramData\chocolatey\bin\cpush --verbose --api-key ${env:CHOCOLATEY_API} %%c # # Mailer plugin was not converted because GitHub Actions will email the actor after failed build and does not support emailing a list of recipients + + From 06ca9756fc439404780f6cf702f61542edc02063 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Thu, 14 Dec 2023 13:33:00 +0100 Subject: [PATCH 21/26] fix Variable GITHUB_REPOSITROY --- .github/workflows/cyberduck-release-windows-chocolatey.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cyberduck-release-windows-chocolatey.yml b/.github/workflows/cyberduck-release-windows-chocolatey.yml index 321b17cf839..f1d4fcf6aae 100644 --- a/.github/workflows/cyberduck-release-windows-chocolatey.yml +++ b/.github/workflows/cyberduck-release-windows-chocolatey.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v4.1.0 - name: run batch command shell: cmd - run: FOR %%c in ("%WORKSPACE%\..\cyberduck-release-windows\windows\target\release\cyberduck.*.nupkg") DO C:\ProgramData\chocolatey\bin\cpush --verbose --api-key ${env:CHOCOLATEY_API} %%c + run: FOR %%c in ("%GITHUB_REPOSITORY%\..\cyberduck-release-windows\windows\target\release\cyberduck.*.nupkg") DO C:\ProgramData\chocolatey\bin\cpush --verbose --api-key %CHOCOLATEY_API% %%c # # Mailer plugin was not converted because GitHub Actions will email the actor after failed build and does not support emailing a list of recipients From 40c20d8f10167239696a26bb666a6b59b908794f Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Thu, 14 Dec 2023 13:38:57 +0100 Subject: [PATCH 22/26] update runs-on --- .github/workflows/cyberduck-release-windows-chocolatey.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cyberduck-release-windows-chocolatey.yml b/.github/workflows/cyberduck-release-windows-chocolatey.yml index f1d4fcf6aae..1500d5e8948 100644 --- a/.github/workflows/cyberduck-release-windows-chocolatey.yml +++ b/.github/workflows/cyberduck-release-windows-chocolatey.yml @@ -7,8 +7,7 @@ env: jobs: build: runs-on: - - self-hosted - - windows + - windows-latest steps: - name: checkout uses: actions/checkout@v4.1.0 From b8f7da7389357ca2abfba9b504373d818e788f6b Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Thu, 11 Jan 2024 17:05:47 +0100 Subject: [PATCH 23/26] draft main.yml --- .github/workflows/main.yml | 91 ++++++++++++++++++++++++++ .github/workflows/template/build.yml | 14 ++++ .github/workflows/template/publish.yml | 0 .github/workflows/template/upload.yml | 14 ++++ 4 files changed, 119 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/template/build.yml create mode 100644 .github/workflows/template/publish.yml create mode 100644 .github/workflows/template/upload.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000000..15b7a810d97 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,91 @@ +name: Main + +on: + push: + branches: [ features/template-workflow] + +env: + + AWS_ACCESS_KEY_DEPLOYMENT: "${{ secrets.AWS_ACCESS_KEY_DEPLOYMENT }}" + AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets.AWS_SECRET_KEY_DEPLOYMENT }}" + MAVEN_SERVER_PASSWORD: "${{ secrets.MAVEN_SERVER_PASSWORD }}" + RACKSPACE_USER: "${{ secrets.RACKSPACE_USER }}" + RACKSPACE_PASSWORD: "${{ secrets.RACKSPACE_PASSWORD }}" + VERSION_CYBERDUCK_IO_HOST_NAME: "${{ secrets.VERSION_CYBERDUCK_IO_HOST_NAME }}" + VERSION_CYBERDUCK_IO_KNOW_HOSTS: "${{ secrets.VERSION_CYBERDUCK_IO_KNOW_HOSTS }}" + VERSION_CYBERDUCK_IO_USER: "${{ secrets.VERSION_CYBERDUCK_IO_USER }}" + +jobs: + get_variables_job: + runs-on: ubuntu-latest + env: + MAVEN_ARGS_WIN: " " + MAVEN_ARGS_MACOS: " " + AWS_PATH: " " + RACKSPACE_PATH: " " + FILETRANSFER_PATH_MACOS: " " + FILETRANSFER_PATH_WIN: " " + BRANCH_TAG: " " + Time: "H18 * *" + PUBLISH_TIGGER: false + variable2: Wert2$ + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set variables + id: set_vars + if: github.event_name == 'schedule' + run: | + echo "MAVEN_ARGS_WIN=clean deploy --projects windows,i18n,profiles,importer --also-make --update-snapshots --settings $WORKSPACE/settings.xml -DskipTests -Dsparkle.feed=nightly" >> $GITHUB_ENV + echo "MAVEN_ARGS_MACOS=clean deploy --update-snapshots --projects osx,i18n,profiles,importer --also-make --settings $WORKSPACE/settings.xml -DskipTests -DskipNotarize=${{ env.SKIP_NOTARIZE }} -Dxcode.configuration=Release -Dsparkle.feed=nightly -Dinstaller.certificate='Developer ID Installer: David Kocher (G69SCX94XU)' -Dcodesign.certificate='Developer ID Application: David Kocher (G69SCX94XU)' -Dcodesign.arg='--entitlements ${{ github.workspace }}/setup/app/default.entitlements --requirements ${{ github.workspace }}/setup/app/codesign-requirement.bin'" >> $GITHUB_ENV + echo "AWS_PATH=s3:/snapshots.cyberduck.io/" >> $GITHUB_ENV + echo "RACKSPACE_PATH=rackspace:/snapshots.cyberduck.io/" >> $GITHUB_ENV + echo "FILETRANSFER_PATH_MACOS=nightly" >> $GITHUB_ENV + echo "FILETRANSFER_PATH_WIN=windows/nightly" >> $GITHUB_ENV + echo "BRANCH_TAG=/master" >> $GITHUB_ENV + + - name: Set output + id: vars + run: | + echo "::set-output name=MAVEN_ARGS_WIN::${{ env.MAVEN_ARGS_WIN }}" + echo "::set-output name=MAVEN_ARGS_MACOS::${{ env.MAVEN_ARGS_MACOS }}" + echo "::set-output name=AWS_PATH::${{ env.AWS_PATH }}" + echo "::set-output name=RACKSPACE_PATH::${{ env.RACKSPACE_PATH }}" + echo "::set-output name=FILETRANSFER_PATH_MACOS::${{ env.FILETRANSFER_PATH_MACOS }}" + echo "::set-output name=FILETRANSFER_PATH_WIN::${{ env.FILETRANSFER_PATH_WIN }}" + echo "::set-output name=BRANCH_TAG::${{ env.BRANCH_TAG }}" + echo "::set-output name=Time::${{ env.Time }}" + echo "::set-output name=PUBLISH_TIGGER::${{ env.PUBLISH_TIGGER }}" + + + + call-reusable-job-build: + needs: get_variables_job + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Call reusable job Build + uses: ./.github/workflows/template/build.yml@main + with: + MavenArgsWin: ${{ needs.get_variables_job.outputs.MAVEN_ARGS_WIN }} + MavenArgsMacos: ${{ needs.get_variables_job.outputs.MAVEN_ARGS_MACOS }} + AwsPath: ${{ needs.get_variables_job.outputs.AWS_PATH }} + RackspacePath: ${{ needs.get_variables_job.outputs.RACKSPACE_PATH }} + + + call-reusable-job-upload: + needs: [get_variables_job, call-reusable-job-build] + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Call reusable job Upload + uses: ./.github/workflows/template/upload.yml@main + with: + MavenArgsWin: ${{ needs.get_variables_job.outputs.MAVEN_ARGS_WIN }} diff --git a/.github/workflows/template/build.yml b/.github/workflows/template/build.yml new file mode 100644 index 00000000000..60e53b1a759 --- /dev/null +++ b/.github/workflows/template/build.yml @@ -0,0 +1,14 @@ +name: Wiederverwendbarer Workflow Build + +on: + workflow_dispatch: # Oder irgendein anderer Trigger, der für deinen Fall geeignet ist + +jobs: + process_variables: + runs-on: ubuntu-latest + + steps: + - name: Zeige die übergebenen Variablen an + run: | + echo "Variable 1: ${{ github.event.inputs.variable1 }}" + echo "Variable 2: ${{ github.event.inputs.variable2 }}" \ No newline at end of file diff --git a/.github/workflows/template/publish.yml b/.github/workflows/template/publish.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/.github/workflows/template/upload.yml b/.github/workflows/template/upload.yml new file mode 100644 index 00000000000..8806ea9174d --- /dev/null +++ b/.github/workflows/template/upload.yml @@ -0,0 +1,14 @@ +name: Wiederverwendbarer Workflow Deploy + +on: + workflow_dispatch: # Oder irgendein anderer Trigger, der für deinen Fall geeignet ist + +jobs: + process_variables: + runs-on: ubuntu-latest + + steps: + - name: Zeige die übergebenen Variablen an + run: | + echo "Variable 1: ${{ github.event.inputs.variable1 }}" + echo "Variable 2: ${{ github.event.inputs.variable2 }}" \ No newline at end of file From 0a8cdbb9156256fc13d7e2533a2ce5593c6d64e5 Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Thu, 11 Jan 2024 19:32:19 +0100 Subject: [PATCH 24/26] added if condition --- .github/workflows/main.yml | 48 +++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15b7a810d97..812bcce92b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,8 +33,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Set variables - id: set_vars + - name: Set variables if schedule + id: set_vars_schedule if: github.event_name == 'schedule' run: | echo "MAVEN_ARGS_WIN=clean deploy --projects windows,i18n,profiles,importer --also-make --update-snapshots --settings $WORKSPACE/settings.xml -DskipTests -Dsparkle.feed=nightly" >> $GITHUB_ENV @@ -44,7 +44,37 @@ jobs: echo "FILETRANSFER_PATH_MACOS=nightly" >> $GITHUB_ENV echo "FILETRANSFER_PATH_WIN=windows/nightly" >> $GITHUB_ENV echo "BRANCH_TAG=/master" >> $GITHUB_ENV - + echo "PUBLISH_TIGGER=false" >> $GITHUB_ENV + + - name: Set variables if beta + id: set_vars_beta + if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tag/beta')}} + run: | + echo "MAVEN_ARGS_WIN='clean deploy --projects windows --also-make --update-snapshots --settings $WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=beta" " >> $GITHUB_ENV + echo "MAVEN_ARGS_MACOS=" " clean deploy --update-snapshots --projects osx,i18n,profiles,importer --also-make --settings $WORKSPACE/settings.xml -DskipTests -D"xcode.configuration=Release" -D"sparkle.feed=beta" -D"installer.certificate=Developer ID Installer: David Kocher (G69SCX94XU)" -D"codesign.certificate=Developer ID Application: David Kocher (G69SCX94XU)" -D"codesign.arg=--entitlements ${{ github.workspace }}/setup/app/default.entitlements --requirements ${{ github.workspace }}/setup/app/codesign-requirement.bin"' ">> $GITHUB_ENV + echo "AWS_PATH= s3:/beta.cyberduck.io/" >> $GITHUB_ENV + echo "RACKSPACE_PATH=" rackspace:/beta.cyberduck.io/" >> $GITHUB_ENV + echo "FILETRANSFER_PATH_MACOS="beta" >> $GITHUB_ENV + echo "FILETRANSFER_PATH_WIN=windows/beta" >> $GITHUB_ENV + echo "BRANCH_TAG=github.event.ref">> $GITHUB_ENV + echo "PUBLISH_TIGGER=false" >> $GITHUB_ENV + + - name: Set variables if release + id: set_vars_release + if: ${{ github.event_name == 'release' }} + run: | + echo "MAVEN_ARGS_WIN= clean deploy --settings ${env:GITHUB_WORKSPACE}/settings.xml -DskipTests -D"sparkle.feed=" "" >> $GITHUB_ENV + echo "MAVEN_ARGS_MACOS="" 'clean deploy --projects osx,i18n -am --settings $WORKSPACE/settings.xml-DskipTests -D"xcode.configuration=Release" -D"sparkle.feed="-D"installer.certificate=Developer ID Installer: David Kocher(G69SCX94XU)" -D"codesign.certificate=Developer ID Application: DavidKocher (G69SCX94XU)" -D"codesign.arg=--entitlements ${{ github.workspace}}/setup/app/default.entitlements --requirements ${{ github.workspace}}/setup/app/codesign-requirement.bin"'" >> $GITHUB_ENV + echo "AWS_PATH="s3:/release.cyberduck.io/" >> $GITHUB_ENV + echo "RACKSPACE_PATH=" "rackspace:/cdn.cyberduck.ch/ " >> $GITHUB_ENV + echo "FILETRANSFER_PATH_MACOS="" ${{ env.REMOTE_DIRECTORY }}"" >> $GITHUB_ENV + echo "FILETRANSFER_PATH_WIN=windows" >> $GITHUB_ENV + echo "BRANCH_TAG=github.release.name">> $GITHUB_ENV + echo "PUBLISH_TIGGER=true" >> $GITHUB_ENV + + + + - name: Set output id: vars run: | @@ -73,8 +103,7 @@ jobs: with: MavenArgsWin: ${{ needs.get_variables_job.outputs.MAVEN_ARGS_WIN }} MavenArgsMacos: ${{ needs.get_variables_job.outputs.MAVEN_ARGS_MACOS }} - AwsPath: ${{ needs.get_variables_job.outputs.AWS_PATH }} - RackspacePath: ${{ needs.get_variables_job.outputs.RACKSPACE_PATH }} + call-reusable-job-upload: @@ -88,4 +117,11 @@ jobs: - name: Call reusable job Upload uses: ./.github/workflows/template/upload.yml@main with: - MavenArgsWin: ${{ needs.get_variables_job.outputs.MAVEN_ARGS_WIN }} + FiletransferPathMacos: ${{ needs.get_variables_job.outputs.FILETRANSFER_PATH_MACOS }} + FiletransferPathWin: ${{ needs.get_variables_job.outputs.FILETRANSFER_PATH_WIN }} + versionCyberduckIoHostName: ${{ needs.get_variables_job.outputs.VERSION_CYBERDUCK_IO_HOST_NAME }} + versionCyberduckIoKnowHosts: ${{ needs.get_variables_job.outputs.VERSION_CYBERDUCK_IO_KNOW_HOSTS }} + versionCyberduckIoUser: ${{ needs.get_variables_job.outputs.VERSION_CYBERDUCK_IO_USER }} + AwsPath: ${{ needs.get_variables_job.outputs.AWS_PATH }} + RackspacePath: ${{ needs.get_variables_job.outputs.RACKSPACE_PATH }} + publishTigger: ${{ needs.get_variables_job.outputs.PUBLISH_TIGGER }} \ No newline at end of file From 11d5fc3572c0beaa868a4bc06c8b89363bcd280c Mon Sep 17 00:00:00 2001 From: Raveena Ramany Date: Fri, 19 Jan 2024 19:07:36 +0100 Subject: [PATCH 25/26] added workflow template --- .github/workflows/main.yml | 127 ------------------------ .github/workflows/template-konzept.yml | 42 ++++++++ .github/workflows/template-reusable.yml | 25 +++++ .github/workflows/template/build.yml | 14 --- .github/workflows/template/publish.yml | 0 .github/workflows/template/upload.yml | 14 --- 6 files changed, 67 insertions(+), 155 deletions(-) delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/template-konzept.yml create mode 100644 .github/workflows/template-reusable.yml delete mode 100644 .github/workflows/template/build.yml delete mode 100644 .github/workflows/template/publish.yml delete mode 100644 .github/workflows/template/upload.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 812bcce92b7..00000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,127 +0,0 @@ -name: Main - -on: - push: - branches: [ features/template-workflow] - -env: - - AWS_ACCESS_KEY_DEPLOYMENT: "${{ secrets.AWS_ACCESS_KEY_DEPLOYMENT }}" - AWS_SECRET_KEY_DEPLOYMENT: "${{ secrets.AWS_SECRET_KEY_DEPLOYMENT }}" - MAVEN_SERVER_PASSWORD: "${{ secrets.MAVEN_SERVER_PASSWORD }}" - RACKSPACE_USER: "${{ secrets.RACKSPACE_USER }}" - RACKSPACE_PASSWORD: "${{ secrets.RACKSPACE_PASSWORD }}" - VERSION_CYBERDUCK_IO_HOST_NAME: "${{ secrets.VERSION_CYBERDUCK_IO_HOST_NAME }}" - VERSION_CYBERDUCK_IO_KNOW_HOSTS: "${{ secrets.VERSION_CYBERDUCK_IO_KNOW_HOSTS }}" - VERSION_CYBERDUCK_IO_USER: "${{ secrets.VERSION_CYBERDUCK_IO_USER }}" - -jobs: - get_variables_job: - runs-on: ubuntu-latest - env: - MAVEN_ARGS_WIN: " " - MAVEN_ARGS_MACOS: " " - AWS_PATH: " " - RACKSPACE_PATH: " " - FILETRANSFER_PATH_MACOS: " " - FILETRANSFER_PATH_WIN: " " - BRANCH_TAG: " " - Time: "H18 * *" - PUBLISH_TIGGER: false - variable2: Wert2$ - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set variables if schedule - id: set_vars_schedule - if: github.event_name == 'schedule' - run: | - echo "MAVEN_ARGS_WIN=clean deploy --projects windows,i18n,profiles,importer --also-make --update-snapshots --settings $WORKSPACE/settings.xml -DskipTests -Dsparkle.feed=nightly" >> $GITHUB_ENV - echo "MAVEN_ARGS_MACOS=clean deploy --update-snapshots --projects osx,i18n,profiles,importer --also-make --settings $WORKSPACE/settings.xml -DskipTests -DskipNotarize=${{ env.SKIP_NOTARIZE }} -Dxcode.configuration=Release -Dsparkle.feed=nightly -Dinstaller.certificate='Developer ID Installer: David Kocher (G69SCX94XU)' -Dcodesign.certificate='Developer ID Application: David Kocher (G69SCX94XU)' -Dcodesign.arg='--entitlements ${{ github.workspace }}/setup/app/default.entitlements --requirements ${{ github.workspace }}/setup/app/codesign-requirement.bin'" >> $GITHUB_ENV - echo "AWS_PATH=s3:/snapshots.cyberduck.io/" >> $GITHUB_ENV - echo "RACKSPACE_PATH=rackspace:/snapshots.cyberduck.io/" >> $GITHUB_ENV - echo "FILETRANSFER_PATH_MACOS=nightly" >> $GITHUB_ENV - echo "FILETRANSFER_PATH_WIN=windows/nightly" >> $GITHUB_ENV - echo "BRANCH_TAG=/master" >> $GITHUB_ENV - echo "PUBLISH_TIGGER=false" >> $GITHUB_ENV - - - name: Set variables if beta - id: set_vars_beta - if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tag/beta')}} - run: | - echo "MAVEN_ARGS_WIN='clean deploy --projects windows --also-make --update-snapshots --settings $WORKSPACE/settings.xml -DskipTests -D"sparkle.feed=beta" " >> $GITHUB_ENV - echo "MAVEN_ARGS_MACOS=" " clean deploy --update-snapshots --projects osx,i18n,profiles,importer --also-make --settings $WORKSPACE/settings.xml -DskipTests -D"xcode.configuration=Release" -D"sparkle.feed=beta" -D"installer.certificate=Developer ID Installer: David Kocher (G69SCX94XU)" -D"codesign.certificate=Developer ID Application: David Kocher (G69SCX94XU)" -D"codesign.arg=--entitlements ${{ github.workspace }}/setup/app/default.entitlements --requirements ${{ github.workspace }}/setup/app/codesign-requirement.bin"' ">> $GITHUB_ENV - echo "AWS_PATH= s3:/beta.cyberduck.io/" >> $GITHUB_ENV - echo "RACKSPACE_PATH=" rackspace:/beta.cyberduck.io/" >> $GITHUB_ENV - echo "FILETRANSFER_PATH_MACOS="beta" >> $GITHUB_ENV - echo "FILETRANSFER_PATH_WIN=windows/beta" >> $GITHUB_ENV - echo "BRANCH_TAG=github.event.ref">> $GITHUB_ENV - echo "PUBLISH_TIGGER=false" >> $GITHUB_ENV - - - name: Set variables if release - id: set_vars_release - if: ${{ github.event_name == 'release' }} - run: | - echo "MAVEN_ARGS_WIN= clean deploy --settings ${env:GITHUB_WORKSPACE}/settings.xml -DskipTests -D"sparkle.feed=" "" >> $GITHUB_ENV - echo "MAVEN_ARGS_MACOS="" 'clean deploy --projects osx,i18n -am --settings $WORKSPACE/settings.xml-DskipTests -D"xcode.configuration=Release" -D"sparkle.feed="-D"installer.certificate=Developer ID Installer: David Kocher(G69SCX94XU)" -D"codesign.certificate=Developer ID Application: DavidKocher (G69SCX94XU)" -D"codesign.arg=--entitlements ${{ github.workspace}}/setup/app/default.entitlements --requirements ${{ github.workspace}}/setup/app/codesign-requirement.bin"'" >> $GITHUB_ENV - echo "AWS_PATH="s3:/release.cyberduck.io/" >> $GITHUB_ENV - echo "RACKSPACE_PATH=" "rackspace:/cdn.cyberduck.ch/ " >> $GITHUB_ENV - echo "FILETRANSFER_PATH_MACOS="" ${{ env.REMOTE_DIRECTORY }}"" >> $GITHUB_ENV - echo "FILETRANSFER_PATH_WIN=windows" >> $GITHUB_ENV - echo "BRANCH_TAG=github.release.name">> $GITHUB_ENV - echo "PUBLISH_TIGGER=true" >> $GITHUB_ENV - - - - - - name: Set output - id: vars - run: | - echo "::set-output name=MAVEN_ARGS_WIN::${{ env.MAVEN_ARGS_WIN }}" - echo "::set-output name=MAVEN_ARGS_MACOS::${{ env.MAVEN_ARGS_MACOS }}" - echo "::set-output name=AWS_PATH::${{ env.AWS_PATH }}" - echo "::set-output name=RACKSPACE_PATH::${{ env.RACKSPACE_PATH }}" - echo "::set-output name=FILETRANSFER_PATH_MACOS::${{ env.FILETRANSFER_PATH_MACOS }}" - echo "::set-output name=FILETRANSFER_PATH_WIN::${{ env.FILETRANSFER_PATH_WIN }}" - echo "::set-output name=BRANCH_TAG::${{ env.BRANCH_TAG }}" - echo "::set-output name=Time::${{ env.Time }}" - echo "::set-output name=PUBLISH_TIGGER::${{ env.PUBLISH_TIGGER }}" - - - - call-reusable-job-build: - needs: get_variables_job - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Call reusable job Build - uses: ./.github/workflows/template/build.yml@main - with: - MavenArgsWin: ${{ needs.get_variables_job.outputs.MAVEN_ARGS_WIN }} - MavenArgsMacos: ${{ needs.get_variables_job.outputs.MAVEN_ARGS_MACOS }} - - - - call-reusable-job-upload: - needs: [get_variables_job, call-reusable-job-build] - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Call reusable job Upload - uses: ./.github/workflows/template/upload.yml@main - with: - FiletransferPathMacos: ${{ needs.get_variables_job.outputs.FILETRANSFER_PATH_MACOS }} - FiletransferPathWin: ${{ needs.get_variables_job.outputs.FILETRANSFER_PATH_WIN }} - versionCyberduckIoHostName: ${{ needs.get_variables_job.outputs.VERSION_CYBERDUCK_IO_HOST_NAME }} - versionCyberduckIoKnowHosts: ${{ needs.get_variables_job.outputs.VERSION_CYBERDUCK_IO_KNOW_HOSTS }} - versionCyberduckIoUser: ${{ needs.get_variables_job.outputs.VERSION_CYBERDUCK_IO_USER }} - AwsPath: ${{ needs.get_variables_job.outputs.AWS_PATH }} - RackspacePath: ${{ needs.get_variables_job.outputs.RACKSPACE_PATH }} - publishTigger: ${{ needs.get_variables_job.outputs.PUBLISH_TIGGER }} \ No newline at end of file diff --git a/.github/workflows/template-konzept.yml b/.github/workflows/template-konzept.yml new file mode 100644 index 00000000000..a99d5744c6f --- /dev/null +++ b/.github/workflows/template-konzept.yml @@ -0,0 +1,42 @@ +name: template-konzept + +on: + schedule: + - cron: '*/5 * * * *' + release: + types: [published, prereleased] + +jobs: + set_variables_job: + runs-on: ubuntu-latest + outputs: + VariablePre: ${{steps.set_vars_schedule.outputs.VARIABLEPRE}} + VariableRel: ${{steps.set_vars_schedule.outputs.VARIABLEREL}} + VariableTim: ${{steps.set_vars_schedule.outputs.VARIABLETIM}} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set variables + id: set_vars_schedule + run: | + if [[ "${{ github.event_name }}" = "schedule" ]] + then + echo "VARIABLETIM=IT IS TIMEBASED! " >> "$GITHUB_OUTPUT" + fi + if [[ "${{ github.event_name }}" = "release" ]] + then + if "${{ github.event.release.prerelease }}" + then + echo "VARIABLEPRE=IT IS A PRERELEASE!" >> "$GITHUB_OUTPUT" + else + echo "VARIABLEREL=IT IS A RELEASE!" >> "$GITHUB_OUTPUT" + fi + fi + + call_resuable_job: + needs: set_variables_job + uses: ./.github/workflows/template-reusable.yml + with: + variablePre: ${{needs.set_variables_job.outputs.VariablePre}} + variableRel: ${{needs.set_variables_job.outputs.VariableRel}} + variableTim: ${{needs.set_variables_job.outputs.VariableTim}} \ No newline at end of file diff --git a/.github/workflows/template-reusable.yml b/.github/workflows/template-reusable.yml new file mode 100644 index 00000000000..73b49f038f0 --- /dev/null +++ b/.github/workflows/template-reusable.yml @@ -0,0 +1,25 @@ +name: template-reusable + +on: + workflow_call: + inputs: + variablePre: + required: true + type: string + variableRel: + required: true + type: string + variableTim: + required: true + type: string + + +jobs: + my_job: + runs-on: ubuntu-latest + steps: + - name: Print variables + run: | + echo "Prerelease: ${{ inputs.variablePre }}" + echo "Release: ${{ inputs.variableRel }}" + echo "Time: ${{ inputs.variableTim }}" \ No newline at end of file diff --git a/.github/workflows/template/build.yml b/.github/workflows/template/build.yml deleted file mode 100644 index 60e53b1a759..00000000000 --- a/.github/workflows/template/build.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Wiederverwendbarer Workflow Build - -on: - workflow_dispatch: # Oder irgendein anderer Trigger, der für deinen Fall geeignet ist - -jobs: - process_variables: - runs-on: ubuntu-latest - - steps: - - name: Zeige die übergebenen Variablen an - run: | - echo "Variable 1: ${{ github.event.inputs.variable1 }}" - echo "Variable 2: ${{ github.event.inputs.variable2 }}" \ No newline at end of file diff --git a/.github/workflows/template/publish.yml b/.github/workflows/template/publish.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/.github/workflows/template/upload.yml b/.github/workflows/template/upload.yml deleted file mode 100644 index 8806ea9174d..00000000000 --- a/.github/workflows/template/upload.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Wiederverwendbarer Workflow Deploy - -on: - workflow_dispatch: # Oder irgendein anderer Trigger, der für deinen Fall geeignet ist - -jobs: - process_variables: - runs-on: ubuntu-latest - - steps: - - name: Zeige die übergebenen Variablen an - run: | - echo "Variable 1: ${{ github.event.inputs.variable1 }}" - echo "Variable 2: ${{ github.event.inputs.variable2 }}" \ No newline at end of file From 270fc41a053c2f1c91df4a4356d5bf1ec69067c0 Mon Sep 17 00:00:00 2001 From: RaveenaRamany <61196071+RaveenaRamany@users.noreply.github.com> Date: Fri, 19 Jan 2024 19:37:36 +0100 Subject: [PATCH 26/26] Chanced schedule time --- .github/workflows/template-konzept.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template-konzept.yml b/.github/workflows/template-konzept.yml index a99d5744c6f..adb15fcf38e 100644 --- a/.github/workflows/template-konzept.yml +++ b/.github/workflows/template-konzept.yml @@ -2,7 +2,7 @@ name: template-konzept on: schedule: - - cron: '*/5 * * * *' + - cron: '0 18 * * *' release: types: [published, prereleased] @@ -39,4 +39,4 @@ jobs: with: variablePre: ${{needs.set_variables_job.outputs.VariablePre}} variableRel: ${{needs.set_variables_job.outputs.VariableRel}} - variableTim: ${{needs.set_variables_job.outputs.VariableTim}} \ No newline at end of file + variableTim: ${{needs.set_variables_job.outputs.VariableTim}}