Skip to content

Commit 08a3564

Browse files
committed
ci: Add release-please
1 parent fd20ad5 commit 08a3564

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

.github/.release-please-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ ".": "0.0.0" }

.github/release-please-config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "go",
6+
"bump-minor-pre-major": true,
7+
"include-v-in-tag": true,
8+
"version-file": "main.go"
9+
}
10+
}
11+
}

.github/workflows/ci.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,21 @@ jobs:
5656
uses: golangci/golangci-lint-action@v8
5757
with:
5858
version: v2.1
59+
release:
60+
name: Release
61+
runs-on: ubuntu-latest
62+
if: github.ref == 'refs/heads/main'
63+
needs: [build, tidy, test, lint]
64+
steps:
65+
- name: Create app token
66+
uses: actions/create-github-app-token@v2
67+
id: app-token
68+
with:
69+
app-id: ${{ vars.APP_ID }}
70+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
71+
- name: Create release
72+
uses: googleapis/release-please-action@v4
73+
with:
74+
token: ${{ steps.app-token.outputs.token }}
75+
config-file: .github/release-please-config.json
76+
manifest-file: .github/.release-please-manifest.json

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ import (
3232
"github.com/armsnyder/gdshader-language-server/internal/lsp"
3333
)
3434

35-
// Version can be set at build time.
36-
var Version = "development"
35+
// Version is set by release-please.
36+
const Version = "0.0.0"
3737

3838
func main() {
3939
var flags struct {

0 commit comments

Comments
 (0)