diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8b53e41..668c5f4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -3,6 +3,7 @@ name: Go on: push: branches: ["main"] + tags: ["v*"] # Déclenche aussi le workflow quand un tag est poussé pull_request: branches: ["main"] @@ -47,8 +48,28 @@ jobs: ls -lh dist/ - - name: Upload binaries + - name: Upload binaries as artifacts uses: actions/upload-artifact@v4 with: - name: gosh + name: gosh-binaries path: dist/ + + release: + needs: build-multiarch + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') # Exécuter uniquement pour les tags commençant par "v" + steps: + - uses: actions/checkout@v4 + + - name: Download built binaries + uses: actions/download-artifact@v4 + with: + name: gosh-binaries + path: dist/ + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: dist/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/main.go b/main.go index 0c44a14..3326353 100644 --- a/main.go +++ b/main.go @@ -64,7 +64,7 @@ func execInput(input string) error { case "exit": os.Exit(0) case "version": - fmt.Println("GoShell Version 0.2.0") + fmt.Println("GoShell Version 1.0.0") return nil }