diff --git a/.github/workflows/cyberduck-release-windows-chocolatey.yml b/.github/workflows/cyberduck-release-windows-chocolatey.yml new file mode 100644 index 00000000000..d0f1f3828c1 --- /dev/null +++ b/.github/workflows/cyberduck-release-windows-chocolatey.yml @@ -0,0 +1,20 @@ +name: cyberduck-release-windows-chocolatey +on: + workflow_dispatch: +env: + CHOCOLATEY_API: "${{ secrets.CHOCOLATEY_API_KEY }}" +jobs: + build: + runs-on: + - windows-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + - name: Publish to Chocolatey + shell: powershell + run: choco config set --name="'defaultPushSource'" --value="${Env:GITHUB_WORKSPACE}\..\"; choco apikey add -k ${Env:CHOCOLATEY_API} -s "${Env:GITHUB_WORKSPACE}\..\"; Get-ChildItem "${Env:GITHUB_WORKSPACE}\0-TEMP-CHOCO\" -Filter *.nupkg | Foreach-Object -process { choco push $_.FullName --debug } + # TODO: The following line must be used for production + # choco config set --name="'defaultPushSource'" --value="'https://push.chocolatey.org/'"; choco apikey add -k ${Env:CHOCOLATEY_API} -s https://push.chocolatey.org/; Get-ChildItem "${Env:GITHUB_WORKSPACE}\..\cyberduck-release-windows\windows\target\release\" -Filter cyberduck.*.nupkg | Foreach-Object -process { choco push $_.FullName --debug } + + # TODO: Github only allows sending notifications to the actor of the GitHub Action: https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs + # Mailer plugin was not converted because GitHub Actions will email the actor after failed build and does not support emailing a list of recipients diff --git a/.github/workflows/cyberduck-release-windows.yml b/.github/workflows/cyberduck-release-windows.yml new file mode 100644 index 00000000000..1b65197b52a --- /dev/null +++ b/.github/workflows/cyberduck-release-windows.yml @@ -0,0 +1,161 @@ +name: cyberduck-release-windows +on: + workflow_dispatch: + inputs: + 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 }}" + RACKSPACE_PASSWORD: "${{ secrets.RACKSPACE_PASSWORD }}" + +jobs: + build: + runs-on: + - windows-latest + 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 + with: + ref: ${{ inputs.GIT_TAG }} + - 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: '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 $GITHUB_REPOSITORY/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 + - 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 + - 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: 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 }} + 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' diff --git a/0-TEMP-CHOCO/git.2.43.0.nupkg b/0-TEMP-CHOCO/git.2.43.0.nupkg new file mode 100644 index 00000000000..be78722fad9 Binary files /dev/null and b/0-TEMP-CHOCO/git.2.43.0.nupkg differ 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