diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a92be8..c06125f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +--- name: CI on: @@ -10,61 +11,40 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Checkout fred - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: 'hyphanet/fred' fetch-depth: 0 path: 'fred' - name: Download fred from the Github Release - uses: i3h/download-release-asset@v1.1.0 - with: - owner: "hyphanet" - repo: "fred" - tag: "latest" - file: "freenet.jar" - - - uses: eskatos/gradle-command-action@v1 - with: - arguments: unzip + shell: pwsh + run: | + $json = curl.exe "https://api.github.com/repos/hyphanet/fred/releases/latest" | ConvertFrom-Json + foreach ($asset in $json.assets){ if ($asset.name -eq "freenet.jar"){ $url = $asset.browser_download_url.ToString() } } + curl.exe --output freenet.jar --location $url + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - - uses: eskatos/gradle-command-action@v1 - with: - arguments: updateSetupFile + - name: Unzip and update setup file + run: | + .\gradlew.bat unzip + .\gradlew.bat updateSetupFile - name: Building the installer run: | "%programfiles(x86)%\Inno Setup 6\iscc.exe" "FreenetInstall_InnoSetup.iss" shell: cmd - -# - name: Sign the installer -# uses: nextgens/authenticode-sign-action@v1.0.1 -# if: ${{ github.event_name != 'pull_request' }} -# with: -# certificate: '${{ secrets.CERTIFICATES }}' -# credentials: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}' -# key-uri: "projects/fpi-codesign/locations/europe-west3/keyRings/code-signing/cryptoKeys/certificate/cryptoKeyVersions/1" -# timestamp-url: 'http://timestamp.comodoca.com' -# description: 'Freenet Installer' -# description-url: 'https://freenetproject.org' -# folder: "Output" -# recursive: true -# -# - name: Verify the signature -# if: ${{ github.event_name != 'pull_request' }} -# run: call "%programfiles(x86)%/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" verify /v /pa "Output/FreenetInstaller.exe" -# shell: cmd - + - name: Upload the installer as an artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ github.event_name != 'pull_request' }} with: path: "Output/FreenetInstaller.exe" name: wininstaller-innosetup -