File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11$Env: GOOS = " linux" ; $Env: GOARCH = " amd64"
2- & " ${ENV: USERPROFILE} \source\repos\GoPowered\bin\Release\net10.0\GoPowered.exe" build
3- cd .gopowered/ compile/ go
4- go build - buildvcs= false
5- cd ../ ../ ..
2+
63mkdir bin - ErrorAction Ignore
7- move .gopowered/ compile/ go/ go ./ bin/ removeLime - Force
8- git add ./ bin/ removeLime
4+
5+ function build ()
6+ {
7+ cd scripts/ $args
8+ & " ${ENV: USERPROFILE} \source\repos\GoPowered\bin\Release\net10.0\GoPowered.exe" build
9+ cd .gopowered/ compile/ go
10+ go build - buildvcs= false
11+ cd ../ ../ ..
12+ cd ../ ..
13+ move scripts/ $args / .gopowered/ compile/ go/ go ./ bin/ $args - Force
14+ git add ./ bin/ $args
15+ }
16+
17+ build removeLime
18+ build getjar
Original file line number Diff line number Diff line change 1+ package main
2+
3+ import "strings"
4+ import "fmt"
5+ import "os"
6+
7+ func main () {
8+ fp , err := os .Open ("build/libs" )
9+ if err != nil {
10+ panic (err )
11+ }
12+
13+ defer fp .Close ()
14+
15+ names , err := fp .Readdirnames (0 )
16+ if err != nil {
17+ panic (err )
18+ }
19+
20+ for _ , name := range names {
21+ if ! strings .Contains (name , "-sources" ) {
22+ fmt .Print (name [:len (name ) - 4 ])
23+ return
24+ }
25+ }
26+
27+ os .Exit (1 )
28+ }
File renamed without changes.
Original file line number Diff line number Diff line change 1313
1414env :
1515 ACTIONS_SKIP_PUBLISHING : 1
16+ gen_sources : 1
1617
1718jobs :
1819 build :
@@ -37,16 +38,26 @@ jobs:
3738 - name : Build with Gradle Wrapper
3839 run : " chmod u+x .actions/bin/removeLime; .actions/bin/removeLime; chmod u+x gradlew; ./gradlew build"
3940
40- # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
41- # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
42- #
43- # - name: Setup Gradle
44- # uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
45- # with:
46- # gradle-version: '8.9'
47- #
48- # - name: Build with Gradle 8.9
49- # run: gradle build
41+ - name : Define uploads
42+ run : |
43+ chmod u+x .actions/bin/getjar
44+ echo "jarPath=$(.actions/bin/getjar)" >> $GITHUB_ENV
45+
46+ - name : Upload the runtime artifact
47+ uses : actions/upload-artifact@v4
48+ with :
49+ name : ${{ env.jarPath }}.jar
50+ path : build/libs/${{ env.jarPath }}.jar
51+ if-no-files-found : error
52+ retention-days : 5
53+
54+ - name : Upload the sources artifact
55+ uses : actions/upload-artifact@v4
56+ with :
57+ name : ${{ env.jarPath }}-sources.jar
58+ path : build/libs/${{ env.jarPath }}-sources.jar
59+ if-no-files-found : error
60+ retention-days : 5
5061
5162 dependency-submission :
5263
You can’t perform that action at this time.
0 commit comments