2023-01-09 16:28:39 +00:00
|
|
|
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:
|
|
|
|
release:
|
2023-02-02 18:39:45 +00:00
|
|
|
concurrency: release
|
2023-01-09 16:28:39 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
id-token: write # In order to request a JWT for AWS auth
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download Buildkite Artifacts
|
|
|
|
uses: EnricoMi/download-buildkite-artifact-action@v1.14
|
|
|
|
with:
|
|
|
|
buildkite_token: ${{ secrets.BUILDKITE_TOKEN }}
|
|
|
|
output_path: artifacts
|
|
|
|
- name: Configure AWS Credentials
|
|
|
|
uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
with:
|
|
|
|
role-to-assume: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
|
|
|
|
aws-region: us-east-2
|
|
|
|
- name: Publish Release (Branch)
|
2023-01-09 17:02:50 +00:00
|
|
|
env:
|
|
|
|
AWS_BUCKET: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
|
2023-01-09 16:28:39 +00:00
|
|
|
run: |
|
2023-01-09 20:38:53 +00:00
|
|
|
BRANCH="branch_${{ github.ref_name }}"
|
|
|
|
GIT_ISH="$GITHUB_SHA"
|
2023-01-20 17:42:14 +00:00
|
|
|
./upload_s3.sh "$BRANCH" "$GIT_ISH" "https://install.determinate.systems/nix/rev/$GIT_ISH"
|
2023-01-20 19:13:05 +00:00
|
|
|
- name: Install Instructions (Branch)
|
|
|
|
run: |
|
|
|
|
cat <<EOF
|
|
|
|
This commit can be installed by running the following command:
|
|
|
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/rev/$GITHUB_SHA | sh -s -- install
|
|
|
|
|
|
|
|
The latest commit from this branch can be installed by running the following command:
|
|
|
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/branch/${{ github.ref_name }} | sh -s -- install
|
|
|
|
EOF
|