-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.31 KB
/
ci.yaml
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
50
51
name: CI
on:
push:
pull_request:
jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
release:
name: Release
runs-on: ubuntu-latest
needs:
- shellcheck
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- uses: softprops/action-gh-release@v1
with:
files: ./assume-aws-sso-role
formula:
name: Update homebrew formula
runs-on: ubuntu-latest
needs:
- release
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- name: Update homebrew formula
run: |
# Update formula to latest release
./.github/scripts/update-formula.sh
# Configure git
git config --global user.name assume-aws-sso-role
git config --global user.email [email protected]
git remote set-url origin "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}"
# Commit and push changes
git add assume-aws-sso-role.rb
git commit --message "Update homebrew formula"
git push origin HEAD:main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}