-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add environment to publish on different environments while needed
- Loading branch information
1 parent
071cc94
commit df46588
Showing
3 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,48 @@ on: | |
description: 'The run id of the build job' | ||
required: true | ||
type: string | ||
environment: | ||
description: 'The environment to publish to' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
download-artifacts: | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environment }} | ||
steps: | ||
- name: Download all artifacts | ||
uses: dawidd6/[email protected] | ||
with: | ||
run_id: ${{ inputs.build_run_id }} | ||
path: build/ | ||
- name: ls build | ||
run: ls build | ||
run: ls -la build | ||
- name: compress build with gz | ||
run: | | ||
./compress-release.sh | ||
- name: generate manifest | ||
run: | | ||
./generate-manifest.sh ./build ${{ secrets.BINARIES_BASE_URL }} | ||
upload-binaries: | ||
needs: download-artifacts | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environment }} | ||
strategy: | ||
matrix: | ||
platform-arch: | ||
- { platform: "darwin", arch: "x64" } | ||
- { platform: "darwin", arch: "arm64" } | ||
- { platform: "linux", arch: "x64" } | ||
- { platform: "windows", arch: "x64" } | ||
steps: | ||
- name: Aws Assume Role | ||
uses: aws-actions/[email protected] | ||
with: | ||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | ||
role-session-name: 'openocd-upload-session' | ||
aws-region: ${{ secrets.AWS_S3_REGION }} | ||
- name: Upload to darwin x64 | ||
run: | | ||
aws s3 cp ./build/release/openocd-{platform}-${arch} s3://${{ secrets.BINARIES_BUCKET }}/openocd/${platform}/${arch} --recursive | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,5 @@ jobs: | |
secrets: inherit | ||
needs: call-build | ||
with: | ||
environment: staging | ||
build_run_id: ${{ github.run_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters