Skip to content

Promote dev to stable #18

Promote dev to stable

Promote dev to stable #18

Workflow file for this run

name: Promote dev to stable
on: [workflow_dispatch]
permissions: # Exchange the OIDC token (JWT) for a cloud access token
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::173728190221:role/github-CLI-upload
aws-region: us-east-2
- name: Check out
uses: actions/checkout@v3
- name: Set Github identity
run: |
git config --global user.name clojure-build
git config --global user.email "[email protected]"
- name: Read versions and save for later use
run: |
source script/read_versions.sh
echo "DEVEL_VERSION=$DEVEL_VERSION" >> "$GITHUB_ENV"
echo "DEVEL_SHA=$DEVEL_SHA" >> "$GITHUB_ENV"
echo "STABLE_VERSION=$STABLE_VERSION" >> "$GITHUB_ENV"
echo "STABLE_SHA=$STABLE_SHA" >> "$GITHUB_ENV"
- name: Read versions
run: |
cp devel.properties stable.properties
git add stable.properties
git commit -m "update stable to $DEVEL_VERSION"
git push
- name: Publish new stable version
run: aws s3 cp --only-show-errors "stable.properties" "$S3_BUCKET/install/stable.properties"
env:
S3_BUCKET: ${{ secrets.S3_BUCKET }}
- name: Mark github release as published and latest
run: gh release edit "$DEVEL_VERSION" --prerelease=false --latest
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
- name: Change brew recipe in tap
run: |
echo "old $STABLE_VERSION"
gh workflow run -R clojure/homebrew-tools promote -r master -f old_version="$STABLE_VERSION" -f old_sha="$STABLE_SHA" -f new_version="$DEVEL_VERSION" -f new_sha="$DEVEL_SHA"
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}