Skip to content

Commit 34b3ef4

Browse files
committed
ci: download mutagen binary into resources
1 parent aa22f62 commit 34b3ef4

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ on:
77
release:
88
types: [published]
99

10+
workflow_dispatch:
11+
inputs:
12+
dryrun:
13+
description: 'Run in dry-run mode (upload as artifact instead of release asset)'
14+
required: true
15+
type: boolean
16+
default: false
1017
permissions: {}
1118

1219
# Cancel in-progress runs for when multiple PRs get merged
@@ -23,6 +30,8 @@ jobs:
2330
permissions:
2431
# To upload assets to the release
2532
contents: write
33+
# Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
34+
id-token: write
2635
steps:
2736
- name: Checkout
2837
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -38,6 +47,22 @@ jobs:
3847

3948
- name: Setup Nix
4049
uses: ./.github/actions/nix-devshell
50+
- name: Authenticate to Google Cloud
51+
id: gcloud_auth
52+
uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8
53+
with:
54+
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_ID_PROVIDER }}
55+
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
56+
token_format: "access_token"
57+
58+
- name: Setup GCloud SDK
59+
uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4
60+
61+
- name: Insert Mutagen resources
62+
run: |
63+
gsutil cp gs://coder-desktop/mutagen/v0.18.1/mutagen-agents.tar.gz "Coder Desktop/Resources/mutagen-agents.tar.gz"
64+
gsutil cp gs://coder-desktop/mutagen/v0.18.1/mutagen-darwin-amd64 "Coder Desktop/Resources/mutagen-darwin-amd64"
65+
gsutil cp gs://coder-desktop/mutagen/v0.18.1/mutagen-linux-amd64 "Coder Desktop/Resources/mutagen-linux-amd64"
4166
4267
- name: Build
4368
env:
@@ -51,7 +76,18 @@ jobs:
5176
EXT_PROF: ${{ secrets.CODER_DESKTOP_EXTENSION_PROVISIONPROFILE_B64 }}
5277
run: make release
5378

79+
# Upload as artifact in dry-run mode
80+
- name: Upload Build Artifact
81+
if: ${{ inputs.dryrun }}
82+
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
83+
with:
84+
name: coder-desktop-build
85+
path: ${{ github.workspace }}/out
86+
retention-days: 7
87+
88+
# Upload to release in non-dry-run mode
5489
- name: Upload Release Assets
90+
if: ${{ !inputs.dryrun }}
5591
run: gh release upload "$RELEASE_TAG" "$out"/* --clobber
5692
env:
5793
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -60,7 +96,7 @@ jobs:
6096
update-cask:
6197
name: Update homebrew-coder cask
6298
runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest'}}
63-
if: ${{ github.repository_owner == 'coder' }}
99+
if: ${{ github.repository_owner == 'coder' && !inputs.dryrun }}
64100
needs: build
65101
steps:
66102
- name: Checkout

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy