Skip to content

Commit

Permalink
ci: generate go releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Yu authored and Shawn Yu committed May 13, 2024
1 parent e3012ef commit 0bfb793
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 36 deletions.
36 changes: 3 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ name: Generate release
on:
push:
branches:
- master
paths:
- "src/**"
- ".github/**"
- "**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -17,34 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: codfish/semantic-release-action@v2
id: semantic_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update version in Cargo.toml
if: steps.semantic_release.outputs.new-release-published == 'true'
uses: ciiiii/[email protected]
with:
file: "Cargo.toml"
key: "package.version"
value: ${{ steps.semantic_release.outputs.release-version }}

- name: Cargo build project
if: steps.semantic_release.outputs.new-release-published == 'true'
run: cargo build --release

- name: Commit changes
if: steps.semantic_release.outputs.new-release-published == 'true'
uses: stefanzweifel/git-auto-commit-action@v4
- uses: cli/gh-extension-precompile@v1
with:
commit_message: "chore(AUTO): update app version [skip ci]"
branch: ${{ github.ref_name }}
create_branch: false
go_version: "1.22"

- name: Upload artifact to Github releases
if: steps.semantic_release.outputs.new-release-published == 'true'
uses: cli/gh-extension-precompile@v1
with:
build_script_override: "script/build.sh"
4 changes: 2 additions & 2 deletions golang/cmd/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ var flags cmdFlags
// pushCmd represents the push command
var pushCmd = &cobra.Command{
Use: "push",
Short: "Push current changes and open workflowName in browser",
Long: `Push current changes and open workflowName in browser
Short: "Push current changes and open workflow in browser",
Long: `Push current changes and open workflow in browser
If no workflowName run as been started, this command will wait indefinite until a new workflowName run is started`,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion golang/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Config struct {
func Load() (*Config, error) {
viper.SetConfigName("default-config")
viper.SetConfigType("yml")
viper.AddConfigPath("$HOME/.config/gh-ac-go")
viper.AddConfigPath("$HOME/.config/gh-ac")
viper.SetDefault("hostname", "github.com")

if err := viper.ReadInConfig(); err != nil {
Expand Down

0 comments on commit 0bfb793

Please sign in to comment.