mirror of
https://github.com/DeterminateSystems/flake-checker.git
synced 2024-09-11 14:25:44 +03:00
67 lines
2.1 KiB
YAML
67 lines
2.1 KiB
YAML
name: Release Branch
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
# NOTE: make sure any branches here are also valid directory names,
|
|
# otherwise creating the directory and uploading to s3 will fail
|
|
- "main"
|
|
|
|
jobs:
|
|
build:
|
|
uses: ./.github/workflows/build.yaml
|
|
|
|
release:
|
|
needs: build
|
|
|
|
concurrency: release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
id-token: write # In order to request a JWT for AWS auth
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Configure AWS Credentials
|
|
uses: aws-actions/configure-aws-credentials@v2
|
|
with:
|
|
role-to-assume: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
|
|
aws-region: us-east-2
|
|
|
|
- name: Create the artifacts directory
|
|
run: rm -rf ./artifacts && mkdir ./artifacts
|
|
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: flake-checker-ARM64-macOS
|
|
path: cache-binary-ARM64-macOS
|
|
- name: Persist the cache binary
|
|
run: cp ./cache-binary-ARM64-macOS/flake-checker ./artifacts/flake-checker-ARM64-macOS
|
|
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: flake-checker-X64-macOS
|
|
path: cache-binary-X64-macOS
|
|
- name: Persist the cache binary
|
|
run: cp ./cache-binary-X64-macOS/flake-checker ./artifacts/flake-checker-X64-macOS
|
|
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: flake-checker-X64-Linux
|
|
path: cache-binary-X64-Linux
|
|
- name: Persist the cache binary
|
|
run: cp ./cache-binary-X64-Linux/flake-checker ./artifacts/flake-checker-X64-Linux
|
|
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: flake-checker-ARM64-Linux
|
|
path: cache-binary-ARM64-Linux
|
|
- name: Persist the cache binary
|
|
run: cp ./cache-binary-ARM64-Linux/flake-checker ./artifacts/flake-checker-ARM64-Linux
|
|
|
|
- name: Publish Release (Branch)
|
|
env:
|
|
AWS_BUCKET: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
|
|
run: |
|
|
.github/workflows/upload_s3.sh branch "${{ github.ref_name }}" "$GITHUB_SHA"
|