File tree 6 files changed +102
-0
lines changed
6 files changed +102
-0
lines changed Original file line number Diff line number Diff line change
1
+ changelogPolicy : auto
2
+ preReleaseCommand : pwsh scripts/bump-version.ps1
3
+ targets :
4
+ - name : github
Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- " main"
7
+ - " release/**"
7
8
paths-ignore :
8
9
- " *.md"
9
10
25
26
name : 🧪 Unit tests
26
27
needs : build-extension
27
28
uses : ./.github/workflows/unit_tests.yml
29
+
30
+ package :
31
+ name : 📦 Package
32
+ needs : build-extension
33
+ uses : ./.github/workflows/package.yml
Original file line number Diff line number Diff line change
1
+ name : 📦 Package
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ package :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Checkout repo
11
+ uses : actions/checkout@v4
12
+
13
+ - name : Download artifact
14
+ uses : actions/download-artifact@v4
15
+ with :
16
+ name : sentry-godot-gdextension
17
+ path : artifact/
18
+
19
+ - name : Prepare artifact
20
+ shell : bash
21
+ run : |
22
+ # * Fix crashpad_handler permissions, workaround for https://github.com/actions/upload-artifact/issues/38
23
+ chmod +x artifact/addons/sentrysdk/bin/{linux,macos}/crashpad_handler
24
+ # * Create release archive
25
+ version=$(grep 'VERSION =' SConstruct | cut -d '"' -f 2)
26
+ git_short_sha=$(git rev-parse --short HEAD)
27
+ archive_file="sentry-godot-gdextension-${version}+${git_short_sha}.zip"
28
+ cd artifact/
29
+ mkdir ${GITHUB_WORKSPACE}/out/
30
+ zip -r ${GITHUB_WORKSPACE}/out/${archive_file} ./*
31
+
32
+ - name : Upload artifact
33
+ uses : actions/upload-artifact@v4
34
+ with :
35
+ name : ${{github.sha}}
36
+ path : out/*
Original file line number Diff line number Diff line change
1
+ name : 🎁 Release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ description : Version to release
8
+ required : true
9
+ force :
10
+ description : Force a release even when there are release-blockers (optional)
11
+ required : false
12
+
13
+ jobs :
14
+ job_release :
15
+ runs-on : ubuntu-latest
16
+ name : ' Release a new version: ${{ github.event.inputs.version }}'
17
+ steps :
18
+ - name : Get auth token
19
+ id : token
20
+ uses : actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
21
+ with :
22
+ app-id : ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
23
+ private-key : ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
24
+
25
+ - name : Check out current commit (${{ github.sha }})
26
+ uses : actions/checkout@v4
27
+ with :
28
+ token : ${{ steps.token.outputs.token }}
29
+ fetch-depth : 0
30
+
31
+ - name : Prepare release ${{ github.event.inputs.version }}
32
+ uses : getsentry/action-prepare-release@v1
33
+ env :
34
+ GITHUB_TOKEN : ${{ steps.token.outputs.token }}
35
+ with :
36
+ version : ${{ github.event.inputs.version }}
37
+ force : ${{ github.event.inputs.force }}
Original file line number Diff line number Diff line change
1
+ Param (
2
+ [Parameter (Mandatory = $true )][String ]$prevVersion ,
3
+ [Parameter (Mandatory = $true )][String ]$newVersion
4
+ )
5
+ Set-StrictMode - Version latest
6
+
7
+ $sconsFile = " $PSScriptRoot /../SConstruct"
8
+ $content = Get-Content $sconsFile
9
+ $content -replace ' VERSION = ".*"' , (' VERSION = "' + $newVersion + ' "' ) | Out-File $sconsFile
10
+
11
+ # Check that the version was updated.
12
+ if (" $content " -eq " $ ( Get-Content $sconsFile ) " )
13
+ {
14
+ $versionInFile = [regex ]::Match(" $content " , ' VERSION = "([^"]+)"' ).Groups[1 ].Value
15
+ if (" $versionInFile " -ne " $newVersion " )
16
+ {
17
+ Throw " Failed to update version in $sconsFile - the content didn't change. The version found in the file is '$versionInFile '."
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments