Skip to content

Commit 42495b8

Browse files
[GHA] Add workflow to upload versioned installers on release (#4032)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Danny Rorabaugh <[email protected]>
1 parent c56e0e0 commit 42495b8

File tree

4 files changed

+93
-3
lines changed

4 files changed

+93
-3
lines changed

.github/workflows/backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
if-no-files-found: error
5656
name: coverage
5757
path: Backend.Tests/coverage.cobertura.xml
58-
retention-days: 7
58+
retention-days: 5
5959
- name: Development build
6060
run: dotnet build BackendFramework.sln
6161
- name: Release build

.github/workflows/frontend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
if-no-files-found: error
7979
name: coverage
8080
path: coverage/cobertura-coverage.xml
81-
retention-days: 7
81+
retention-days: 5
8282

8383
upload_coverage:
8484
needs: test_coverage

.github/workflows/installer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
with:
6767
name: combine-net-installer
6868
path: installer/combine-net-installer.run
69-
retention-days: 1
69+
retention-days: 5
7070
- name: Make installer with release version
7171
run: |
7272
cd installer
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: installer_release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
make_installer:
12+
runs-on: ubuntu-latest
13+
steps:
14+
# See https://docs.stepsecurity.io/harden-runner/getting-started/ for instructions on
15+
# configuring harden-runner and identifying allowed endpoints.
16+
- name: Harden Runner
17+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
18+
with:
19+
egress-policy: block
20+
allowed-endpoints: >
21+
*-docker.pkg.dev:443
22+
*.cloudfront.net:443
23+
azure.archive.ubuntu.com:80
24+
cdn.dl.k8s.io:443
25+
dl.k8s.io:443
26+
esm.ubuntu.com:443
27+
files.pythonhosted.org:443
28+
get.helm.sh:443
29+
get.k3s.io:443
30+
github.com:443
31+
kubernetes.github.io:443
32+
packages.microsoft.com:443
33+
prod-registry-k8s-io-us-east-1.s3.dualstack.us-east-1.amazonaws.com:443
34+
prod-registry-k8s-io-us-east-2.s3.dualstack.us-east-2.amazonaws.com:443
35+
prod-registry-k8s-io-us-west-1.s3.dualstack.us-west-1.amazonaws.com:443
36+
prod-registry-k8s-io-us-west-2.s3.dualstack.us-west-2.amazonaws.com:443
37+
public.ecr.aws:443
38+
pypi.org:443
39+
registry.k8s.io:443
40+
release-assets.githubusercontent.com:443
41+
- name: Checkout repository
42+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
43+
with:
44+
fetch-depth: 0
45+
- name: Install dependencies
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y makeself
49+
shell: bash
50+
- name: Make installer with release version
51+
run: |
52+
cd installer
53+
./make-combine-installer.sh ${{ github.event.release.tag_name }} --debug
54+
shell: bash
55+
- name: Upload installer artifact
56+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
57+
with:
58+
name: combine-installer
59+
path: installer/combine-installer.run
60+
retention-days: 5
61+
62+
upload_installer:
63+
needs: make_installer
64+
runs-on: ubuntu-latest
65+
steps:
66+
# See https://docs.stepsecurity.io/harden-runner/getting-started/ for instructions on
67+
# configuring harden-runner and identifying allowed endpoints.
68+
- name: Harden Runner
69+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
70+
with:
71+
egress-policy: block
72+
allowed-endpoints: >
73+
s3.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com:443
74+
sts.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com:443
75+
- name: Download installer artifact
76+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
77+
with:
78+
name: combine-installer
79+
path: installer/
80+
- name: Configure AWS credentials
81+
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
82+
with:
83+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
84+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
85+
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
86+
- name: Upload installer to S3
87+
run: |
88+
TARGET=s3://software.thecombine.app/combine-installer-${{ github.event.release.tag_name }}.run
89+
aws s3 cp installer/combine-installer.run $TARGET --content-type application/octet-stream
90+
shell: bash

0 commit comments

Comments
 (0)