Skip to content

Commit f20da44

Browse files
committed
attempt the whole flow part 2
1 parent eace6fe commit f20da44

File tree

5 files changed

+29
-45
lines changed

5 files changed

+29
-45
lines changed
Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Binary
1+
name: Deploy GitHub Artifacts
22

33
on:
44
workflow_call:
@@ -20,42 +20,26 @@ on:
2020
type: string
2121

2222
jobs:
23-
release-binary:
23+
deploy-artifacts:
2424
runs-on: ubuntu-24.04
2525
env:
2626
TERM: xterm
2727
steps:
2828
- name: Create and enter path
2929
run: |
30-
mkdir -p /tmp/deploy-s3/${{ github.sha }}
31-
cd /tmp/${{ github.sha }}
32-
- name: Download binaries
30+
mkdir -p /tmp/deploy-artifacts/${{ github.sha }}
31+
cd /tmp/deploy-artifacts/${{ github.sha }}
32+
- name: Download artifacts
3333
id: download-artifacts
3434
uses: actions/download-artifact@v4
3535
with:
3636
name: ${{ inputs.download-name }}
3737
merge-multiple: true
38-
path: /tmp/deploy-s3/${{ github.sha }}
38+
path: /tmp/deploy-artifacts/${{ github.sha }}
3939
pattern: ${{ inputs.download-pattern }}
40-
- name: Configure S3 Credentials
41-
uses: aws-actions/configure-aws-credentials@v4
42-
with:
43-
aws-access-key-id: ${{ secrets.S3_ACCESS_KEY_ID }}
44-
aws-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }}
45-
aws-region: us-east-1
46-
- name: Upload dev releases to S3
47-
shell: bash
48-
run: |
49-
aws s3 sync /tmp/deploy-s3/${{ github.sha }} s3://files.lando.dev
50-
aws s3 sync /tmp/deploy-s3/${{ github.sha }} s3://files.lando.dev/cli
51-
aws s3 sync /tmp/deploy-s3/${{ github.sha }} s3://files.lando.dev/core
52-
53-
54-
- name: Upload signed binaries
40+
- name: Upload artifacts
5541
uses: actions/upload-artifact@v4
5642
with:
57-
name: release-binary-${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}"
58-
overwrite: true
59-
path: /tmp/release-binary/${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}"
43+
name: ${{ inputs.upload-name }}
44+
path: /tmp/deploy-artifacts/${{ github.sha }}/*
6045
if-no-files-found: error
61-
retention-days: 1

.github/workflows/deploy-s3.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Binary
1+
name: Deploy S3
22

33
on:
44
workflow_call:
@@ -33,7 +33,7 @@ jobs:
3333
- name: Create and enter path
3434
run: |
3535
mkdir -p /tmp/deploy-s3/${{ github.sha }}
36-
cd /tmp/${{ github.sha }}
36+
cd /tmp/deploy-s3/${{ github.sha }}
3737
- name: Download binaries
3838
id: download-artifacts
3939
uses: actions/download-artifact@v4

.github/workflows/generate-checksums.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ jobs:
4848
- name: Checkout code
4949
uses: actions/checkout@v4
5050
- name: Ensure path
51-
run: mkdir -p /tmp/${{ github.sha }}
51+
run: mkdir -p /tmp/checksums/${{ github.sha }}
5252
- name: Download artifacts
5353
uses: actions/download-artifact@v4
5454
with:
5555
name: ${{ inputs.download-name }}
56-
path: /tmp/${{ github.sha }}
56+
path: /tmp/checksums/${{ github.sha }}
5757
pattern: ${{ inputs.download-pattern }}
5858
merge-multiple: ${{ inputs.flatten }}
5959
- name: Verify files
6060
run: |
6161
echo "::group::Organized checksummed files"
62-
ls -lsa /tmp/${{ github.sha }}
62+
ls -lsa /tmp/checksums/${{ github.sha }}
6363
echo "::endgroup::"
6464
- name: Checksum files
6565
run: |
66-
cd /tmp/${{ github.sha }}
66+
/tmp/checksums/${{ github.sha }}
6767
bash ${{ github.workspace }}/scripts/generate-checksums.sh \
6868
--depth=${{ inputs.depth }} \
6969
--output=/tmp/${{ inputs.output }} \
@@ -72,6 +72,6 @@ jobs:
7272
uses: actions/upload-artifact@v4
7373
with:
7474
name: ${{ inputs.upload-name }}
75-
path: /tmp/${{ inputs.output }}
75+
path: /tmp/checksums/${{ github.sha }}/${{ inputs.output }}
7676
if-no-files-found: error
7777
retention-days: 1

.github/workflows/release-binary.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,31 @@ jobs:
2828
env:
2929
TERM: xterm
3030
steps:
31-
- name: Create and enter path
31+
- name: Create paths
3232
run: |
33-
mkdir -p /tmp/${{ github.sha }}
34-
cd /tmp/${{ github.sha }}
33+
mkdir -p /tmp/release-binary-source/${{ github.sha }}
34+
mkdir -p /tmp/release-binary-destination/${{ github.sha }}
3535
- name: Download binaries
3636
id: download-artifacts
3737
uses: actions/download-artifact@v4
3838
with:
3939
name: ${{ inputs.download-name }}
4040
merge-multiple: true
41-
path: /tmp/${{ github.sha }}
41+
path: /tmp/release-binary-source/${{ github.sha }}
4242
pattern: ${{ inputs.download-pattern }}
4343
- name: Mod as needed
4444
run: |
4545
mkdir -p /tmp/release-binary
4646
cp -rf \
47-
"/tmp/${{ github.sha }}/${{ inputs.source }}${{ runner.os == 'Windows' && !endsWith(inputs.source, '.exe') && '.exe' || '' }}" \
48-
"/tmp/release-binary/${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}"
49-
chmod +x /tmp/release-binary/*
50-
ls -lsa /tmp/release-binary
47+
"/tmp/release-binary-source/${{ github.sha }}}/${{ inputs.source }}${{ runner.os == 'Windows' && !endsWith(inputs.source, '.exe') && '.exe' || '' }}" \
48+
"/tmp/release-binary-destination/${{ github.sha }}/${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}"
49+
chmod +x /tmp/release-binary-destination/${{ github.sha }}/*
50+
ls -lsa /tmp/release-binary-destination/${{ github.sha }}
5151
- name: Upload signed binaries
5252
uses: actions/upload-artifact@v4
5353
with:
5454
name: release-binary-${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}"
5555
overwrite: true
56-
path: /tmp/release-binary/${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}"
56+
path: /tmp/release-binary/${{ github.sha }}/${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}"
5757
if-no-files-found: error
5858
retention-days: 1

.github/workflows/sign-binary.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ jobs:
5858
uses: actions/checkout@v4
5959
- name: Create and enter path
6060
run: |
61-
mkdir -p /tmp/${{ github.sha }}
62-
cd /tmp/${{ github.sha }}
61+
mkdir -p /tmp/sign/${{ github.sha }}
62+
cd /tmp/sign/${{ github.sha }}
6363
- name: Download binaries
6464
id: download-artifacts
6565
uses: actions/download-artifact@v4
6666
with:
6767
name: ${{ inputs.download-name }}
6868
merge-multiple: true
69-
path: /tmp/${{ github.sha }}
69+
path: /tmp/sign/${{ github.sha }}
7070
pattern: ${{ inputs.download-pattern }}
7171
- name: Sign and Notarize
7272
id: code-sign-action
@@ -90,6 +90,6 @@ jobs:
9090
uses: actions/upload-artifact@v4
9191
with:
9292
name: signed-${{ inputs.file }}
93-
path: /tmp/${{ github.sha }}/${{ inputs.file }}${{ runner.os == 'Windows' && !endsWith(inputs.file, '.exe') && '.exe' || '' }}
93+
path: /tmp/sign/${{ github.sha }}/${{ inputs.file }}${{ runner.os == 'Windows' && !endsWith(inputs.file, '.exe') && '.exe' || '' }}
9494
if-no-files-found: error
9595
retention-days: 1

0 commit comments

Comments
 (0)