Skip to content

Commit c0498da

Browse files
committed
chore: correct username/email for first release
1 parent ec95733 commit c0498da

File tree

5 files changed

+50
-15
lines changed

5 files changed

+50
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: GuardRails CLI CI
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
ci:

.github/workflows/release.yaml

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,50 @@ jobs:
3131
- name: Set new version as environment variable
3232
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
3333

34+
- name: Unprotect main branch
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
37+
run: |
38+
curl --silent -o /dev/null --location --request DELETE 'https://api.github.com/repos/guardrailsio/guardrails-cli/branches/main/protection' \
39+
--header "Authorization: token $GITHUB_TOKEN" \
40+
--header 'Accept: application/vnd.github+json' \
41+
--header 'Content-Type: application/json' \
42+
--data-raw ''
43+
3444
- name: Set new version
3545
env:
3646
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
3747
run: |
38-
sed -i -E "s/VERSION=\".*\"/VERSION=\"${{ env.VERSION }}\"/" install.sh
39-
git config --global user.email "wahyudi.ibo.wibowo@gmail.com"
40-
git config --global user.name "wahyudibo"
41-
git remote set-url --push origin https://wahyudibo:$GITHUB_TOKEN@github.com/wahyudibo/goreleaser-poc
48+
sed -i -E "s/VERSION=\".*\"/VERSION=\"${{ env.VERSION }}\"/" etc/scripts/install.sh
49+
git config --global user.email "support@guardrails.io"
50+
git config --global user.name "guardrailsio"
51+
git remote set-url --push origin https://$GITHUB_TOKEN@github.com/guardrailsio/guardrails-cli.git
4252
git checkout main
4353
git add .
4454
git commit -a -m "set version numbers: ${{ env.VERSION }}"
4555
git push origin main
56+
57+
- name: Protect main branch
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
60+
run: |
61+
curl --silent -o /dev/null --location --silent -o /dev/null --request PUT 'https://api.github.com/repos/guardrailsio/guardrails-cli/branches/main/protection' \
62+
--header "Authorization: token $GITHUB_TOKEN" \
63+
--header 'Accept: application/vnd.github+json' \
64+
--header 'Content-Type: application/json' \
65+
--data-raw '{
66+
"required_pull_request_reviews": {
67+
"dismiss_stale_reviews": false,
68+
"require_code_owner_reviews": false,
69+
"require_last_push_approval": false,
70+
"required_approving_review_count": 1
71+
},
72+
"restrictions": null,
73+
"enforce_admins": false,
74+
"required_status_checks": {
75+
"strict": true,
76+
"contexts": [
77+
"guardrails/scan"
78+
]
79+
}
80+
}'

.goreleaser.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ before:
55
# You may remove this if you don't use go modules.
66
- go mod tidy
77
# you may remove this if you don't need go generate
8-
- go generate ./...
8+
# - go generate ./...
99
builds:
1010
- env:
1111
- CGO_ENABLED=0
@@ -43,8 +43,8 @@ brews:
4343
owner: guardrailsio
4444
name: homebrew-guardrails
4545
commit_author:
46-
name: wahyudibo
47-
email: wahyudi.ibo.wibowo@gmail.com
46+
name: guardrailsio
47+
email: support@guardrails.io
4848
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
4949
homepage: "https://www.guardrails.io/"
5050
license: "Apache-2.0"
@@ -54,8 +54,8 @@ scoop:
5454
owner: guardrailsio
5555
name: scoop-bucket-guardrails
5656
commit_author:
57-
name: wahyudibo
58-
email: wahyudi.ibo.wibowo@gmail.com
57+
name: guardrailsio
58+
email: support@guardrails.io
5959
commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
6060
homepage: "https://www.guardrails.io/"
6161
license: Apache-2.0

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Your GuardRails account CLI token can be obtained under `Settings`->`CLI Authent
3838
Just paste this command, and you're good to go. We're assuming you're using `bash`, but you can change it accordingly based on the shell you're using. You might be asked for a password for `sudo` in the installation process.
3939

4040
```
41-
curl -fsSL https://raw.githubusercontent.com/guardrailsio/guardrails-cli/master/etc/scripts/install.sh | bash
41+
curl -fsSL https://raw.githubusercontent.com/guardrailsio/guardrails-cli/main/etc/scripts/install.sh | bash
4242
```
4343

4444
### Brew (Linux / OSX)
@@ -55,7 +55,7 @@ brew install guardrails
5555
You require [scoop](https://scoop.sh) before installing `guardrails`. The rest will be similar to the installation scripts for Linux / OSX. Execute the below command in your powershell:
5656

5757
```
58-
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/guardrailsio/guardrails-cli/master/etc/scripts/install.ps1'))
58+
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/guardrailsio/guardrails-cli/main/etc/scripts/install.ps1'))
5959
```
6060

6161
## Usage
@@ -103,4 +103,4 @@ https://www.guardrails.io/docs/en/cli/introduction
103103

104104
## License
105105

106-
The GuardRails CLI is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/guardrailsio/guardrails-cli/blob/master/LICENSE.txt)
106+
The GuardRails CLI is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/guardrailsio/guardrails-cli/blob/main/LICENSE.txt)

etc/scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
VERSION="v0.1.0"
3+
VERSION="v0.0.0"
44

55
function install_guardrails() {
66
if [[ "$OSTYPE" == "linux"* ]]; then

0 commit comments

Comments
 (0)