-
Notifications
You must be signed in to change notification settings - Fork 27
49 lines (46 loc) · 1.88 KB
/
promote.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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}}