Skip to content

Commit

Permalink
chore: correct username/email for first release
Browse files Browse the repository at this point in the history
  • Loading branch information
gr-thach committed Nov 26, 2022
1 parent ec95733 commit c0498da
Showing 5 changed files with 50 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@ name: GuardRails CLI CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
ci:
43 changes: 39 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -31,15 +31,50 @@ jobs:
- name: Set new version as environment variable
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Unprotect main branch
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
curl --silent -o /dev/null --location --request DELETE 'https://api.github.com/repos/guardrailsio/guardrails-cli/branches/main/protection' \
--header "Authorization: token $GITHUB_TOKEN" \
--header 'Accept: application/vnd.github+json' \
--header 'Content-Type: application/json' \
--data-raw ''
- name: Set new version
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
sed -i -E "s/VERSION=\".*\"/VERSION=\"${{ env.VERSION }}\"/" install.sh
git config --global user.email "wahyudi.ibo.wibowo@gmail.com"
git config --global user.name "wahyudibo"
git remote set-url --push origin https://wahyudibo:$GITHUB_TOKEN@github.com/wahyudibo/goreleaser-poc
sed -i -E "s/VERSION=\".*\"/VERSION=\"${{ env.VERSION }}\"/" etc/scripts/install.sh
git config --global user.email "support@guardrails.io"
git config --global user.name "guardrailsio"
git remote set-url --push origin https://$GITHUB_TOKEN@github.com/guardrailsio/guardrails-cli.git
git checkout main
git add .
git commit -a -m "set version numbers: ${{ env.VERSION }}"
git push origin main
- name: Protect main branch
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
curl --silent -o /dev/null --location --silent -o /dev/null --request PUT 'https://api.github.com/repos/guardrailsio/guardrails-cli/branches/main/protection' \
--header "Authorization: token $GITHUB_TOKEN" \
--header 'Accept: application/vnd.github+json' \
--header 'Content-Type: application/json' \
--data-raw '{
"required_pull_request_reviews": {
"dismiss_stale_reviews": false,
"require_code_owner_reviews": false,
"require_last_push_approval": false,
"required_approving_review_count": 1
},
"restrictions": null,
"enforce_admins": false,
"required_status_checks": {
"strict": true,
"contexts": [
"guardrails/scan"
]
}
}'
10 changes: 5 additions & 5 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ before:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
# - go generate ./...
builds:
- env:
- CGO_ENABLED=0
@@ -43,8 +43,8 @@ brews:
owner: guardrailsio
name: homebrew-guardrails
commit_author:
name: wahyudibo
email: wahyudi.ibo.wibowo@gmail.com
name: guardrailsio
email: support@guardrails.io
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://www.guardrails.io/"
license: "Apache-2.0"
@@ -54,8 +54,8 @@ scoop:
owner: guardrailsio
name: scoop-bucket-guardrails
commit_author:
name: wahyudibo
email: wahyudi.ibo.wibowo@gmail.com
name: guardrailsio
email: support@guardrails.io
commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://www.guardrails.io/"
license: Apache-2.0
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ Your GuardRails account CLI token can be obtained under `Settings`->`CLI Authent
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.

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

### Brew (Linux / OSX)
@@ -55,7 +55,7 @@ brew install guardrails
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:

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

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

## License

The GuardRails CLI is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/guardrailsio/guardrails-cli/blob/master/LICENSE.txt)
The GuardRails CLI is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/guardrailsio/guardrails-cli/blob/main/LICENSE.txt)
2 changes: 1 addition & 1 deletion etc/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

VERSION="v0.1.0"
VERSION="v0.0.0"

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

0 comments on commit c0498da

Please sign in to comment.