|
46 | 46 | - name: Setup Nix
|
47 | 47 | uses: ./.github/actions/nix-devshell
|
48 | 48 |
|
| 49 | + - name: Authenticate to Google Cloud |
| 50 | + id: gcloud_auth |
| 51 | + uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8 |
| 52 | + with: |
| 53 | + workload_identity_provider: ${{ secrets.GCP_WORKLOAD_ID_PROVIDER }} |
| 54 | + service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} |
| 55 | + token_format: "access_token" |
| 56 | + |
49 | 57 | - name: Build
|
50 | 58 | env:
|
51 | 59 | APPLE_DEVELOPER_ID_PKCS12_B64: ${{ secrets.APPLE_DEVELOPER_ID_PKCS12_B64 }}
|
|
68 | 76 | path: ${{ github.workspace }}/outputs/out
|
69 | 77 | retention-days: 7
|
70 | 78 |
|
| 79 | + - name: Get version string |
| 80 | + id: version_string |
| 81 | + run: | |
| 82 | + echo "versionstring=$(./scripts/version.sh)" >> "$GITHUB_OUTPUT" |
| 83 | +
|
71 | 84 | # Upload to release in non-dry-run mode
|
72 | 85 | - name: Upload Release Assets
|
73 | 86 | if: ${{ !inputs.dryrun }}
|
|
76 | 89 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
77 | 90 | RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || 'preview' }}
|
78 | 91 |
|
| 92 | + - name: Download Appcast |
| 93 | + # if: ${{ !inputs.dryrun }} |
| 94 | + run: | |
| 95 | + gsutil cp "gs://releases.coder.com/coder-desktop/mac/appcast.xml" ./oldappcast.xml |
| 96 | +
|
| 97 | + - name: Update Appcast |
| 98 | + # if: ${{ !inputs.dryrun }} |
| 99 | + run: | |
| 100 | + pushd scripts/update-appcast |
| 101 | + swift run update-appcast \ |
| 102 | + -i ../../oldappcast.xml \ |
| 103 | + -s "$out"/Coder-Desktop.pkg.sig \ |
| 104 | + -v "$VERSION_STRING" \ |
| 105 | + -o ../../appcast.xml |
| 106 | + -d "$VERSION_DESCRIPTION" |
| 107 | + popd |
| 108 | + env: |
| 109 | + VERSION_STRING: ${{ steps.version_string.outputs.versionstring }} |
| 110 | + VERSION_DESCRIPTION: ${{ github.event_name == 'release' && github.event.release.body || '' }} |
| 111 | + |
| 112 | + |
| 113 | + - name: Upload Appcast |
| 114 | + # if: ${{ !inputs.dryrun }} |
| 115 | + run: | |
| 116 | + gsutil -h "Cache-Control:no-cache,max-age=0" cp ./appcast.xml "gs://releases.coder.com/coder-desktop/mac/appcast.xml" |
| 117 | +
|
79 | 118 | update-cask:
|
80 | 119 | name: Update homebrew-coder cask
|
81 | 120 | runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest'}}
|
|
0 commit comments