@@ -9,152 +9,151 @@ jobs:
99 publish :
1010 runs-on : ubuntu-22.04
1111 steps :
12- - uses : actions/checkout@v4
13- with :
14- fetch-depth : 0
15- - name : Scala caches
16- uses : actions/cache@v4
17- with :
18- path : |
19- ~/.sbt
20- ~/.ivy2/cache
21- ~/.cache/coursier
22- key : ${{ runner.os }}-sbt-docs-${{ hashFiles('**/*.sbt') }}
23- - uses : actions/setup-java@v4
24- with :
25- java-version : 8
26- distribution : temurin
27- - uses : sbt/setup-sbt@v1
28- - uses : actions/setup-node@v4
29- with :
30- node-version : ' 12.x'
31- - uses : olafurpg/setup-gpg@v3
32- if : startsWith(github.ref, 'refs/tags/v')
33- - name : Publish ${{ github.ref }}
34- run : sbt ci-release
35- env :
36- JAVA_OPTS : -Xmx4G -XX:+UseG1GC
37- JVM_OPTS : -Xmx4G -XX:+UseG1GC
38- PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
39- PGP_SECRET : ${{ secrets.PGP_SECRET }}
40- SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
41- SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
15+ - name : Scala caches
16+ uses : actions/cache@v4
17+ with :
18+ path : |
19+ ~/.sbt
20+ ~/.ivy2/cache
21+ ~/.cache/coursier
22+ key : ${{ runner.os }}-sbt-docs-${{ hashFiles('**/*.sbt') }}
23+ - uses : actions/setup-java@v4
24+ with :
25+ java-version : 8
26+ distribution : temurin
27+ - uses : sbt/setup-sbt@v1
28+ - uses : actions/setup-node@v4
29+ with :
30+ node-version : " 12.x"
31+ - uses : olafurpg/setup-gpg@v3
32+ if : startsWith(github.ref, 'refs/tags/v')
33+ - name : Publish ${{ github.ref }}
34+ run : sbt ci-release
35+ env :
36+ JAVA_OPTS : -Xmx4G -XX:+UseG1GC
37+ JVM_OPTS : -Xmx4G -XX:+UseG1GC
38+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
39+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
40+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
41+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
4242
4343 docs :
4444 runs-on : ubuntu-20.04
4545 steps :
46- - uses : actions/checkout@v4
47- with :
48- fetch-depth : 0
49- - name : Scala caches
50- uses : actions/cache@v4
51- with :
52- path : |
53- ~/.sbt
54- ~/.ivy2/cache
55- ~/.cache/coursier
56- key : ${{ runner.os }}-sbt-docs-${{ hashFiles('**/*.sbt') }}
57- - uses : actions/setup-java@v4
58- with :
59- java-version : 11
60- distribution : temurin
61- - uses : sbt/setup-sbt@v1
62- - uses : actions/setup-node@v4
63- with :
64- node-version : ' 12.x'
65- - name : Update docs
66- run : |
67- git config --global user.name "ScalaPB Docs"
68- git config --global user.email "[email protected] " 69- eval "$(ssh-agent -s)"
70- echo "$TOKEN" | ssh-add -
71- sbt docs/mdoc docs/unidoc
72- cd website
73- yarn install
74- yarn deploy
75- env :
46+ - uses : actions/checkout@v4
47+ with :
48+ fetch-depth : 0
49+ - name : Scala caches
50+ uses : actions/cache@v4
51+ with :
52+ path : |
53+ ~/.sbt
54+ ~/.ivy2/cache
55+ ~/.cache/coursier
56+ key : ${{ runner.os }}-sbt-docs-${{ hashFiles('**/*.sbt') }}
57+ - uses : actions/setup-java@v4
58+ with :
59+ java-version : 11
60+ distribution : temurin
61+ - uses : sbt/setup-sbt@v1
62+ - uses : actions/setup-node@v4
63+ with :
64+ node-version : " 12.x"
65+ - name : Update docs
66+ run : |
67+ git config --global user.name "ScalaPB Docs"
68+ git config --global user.email "[email protected] " 69+ eval "$(ssh-agent -s)"
70+ echo "$TOKEN" | ssh-add -
71+ sbt docs/mdoc docs/unidoc
72+ cd website
73+ yarn install
74+ yarn deploy
75+ env :
7676 TOKEN : ${{secrets.DEPLOY_KEY}}
7777 USE_SSH : true
7878 GIT_USER : git
7979
80-
8180 scalapbc :
8281 runs-on : ubuntu-latest
8382 steps :
84- - uses : actions/checkout@v4
85- with :
86- fetch-depth : 0
87- - uses : actions/setup-java@v4
88- with :
89- java-version : 8
90- distribution : temurin
91- - uses : sbt/setup-sbt@v1
92- - run : |
93- sbt scalapbcJVM2_12/universal:packageBin
94- - uses : actions/upload-artifact@v4
95- with :
96- name : scalapbc
97- path : scalapbc/target/jvm-2.12/universal/scalapbc-*.zip
83+ - uses : actions/checkout@v4
84+ with :
85+ fetch-depth : 0
86+ - uses : actions/setup-java@v4
87+ with :
88+ java-version : 8
89+ distribution : temurin
90+ - uses : sbt/setup-sbt@v1
91+ - run : |
92+ sbt scalapbcJVM2_12/universal:packageBin
93+ - uses : actions/upload-artifact@v4
94+ with :
95+ name : scalapbc
96+ path : scalapbc/target/jvm-2.12/universal/scalapbc-*.zip
9897
9998 native :
10099 strategy :
101100 matrix :
102101 include :
103- - os : ubuntu-latest
104- arch : linux-x86_64
105- - os : macos-12
106- arch : osx-x86_64
102+ - os : ubuntu-latest
103+ arch : linux-x86_64
104+ - os : macos-14
105+ arch : osx-x86_64
107106 runs-on : ${{matrix.os}}
108107 steps :
109- - uses : actions/checkout@v4
110- with :
111- fetch-depth : 0
112- - uses : olafurpg/setup-scala@v14
113- with :
114- 115- - name : Asset name
116- id : vars
117- run : |
118- if [[ $GITHUB_REF = refs/tags/v* ]]; then
119- RELEASE_VERSION=${GITHUB_REF#refs/tags/v}
120- else
121- RELEASE_VERSION=SNAPSHOT
122- fi
123- echo "ASSET=protoc-gen-scala-${RELEASE_VERSION}-${{matrix.arch}}" >> $GITHUB_ENV
108+ - uses : actions/checkout@v4
109+ with :
110+ fetch-depth : 0
111+ - uses : olafurpg/setup-scala@v14
112+ with :
113+ 114+ - name : Asset name
115+ id : vars
116+ run : |
117+ if [[ $GITHUB_REF = refs/tags/v* ]]; then
118+ RELEASE_VERSION=${GITHUB_REF#refs/tags/v}
119+ else
120+ RELEASE_VERSION=SNAPSHOT
121+ fi
122+ echo "ASSET=protoc-gen-scala-${RELEASE_VERSION}-${{matrix.arch}}" >> $GITHUB_ENV
124123
125- - name : build native image
126- run : |
127- set -x
128- gu install native-image
129- ./make_reflect_config.sh
130- sbt protocGenScalaNativeImage/nativeImage
131- zip -j $ASSET.zip target/protoc-gen-scala
124+ - name : build native image
125+ run : |
126+ set -x
127+ gu install native-image
128+ ./make_reflect_config.sh
129+ sbt protocGenScalaNativeImage/nativeImage
130+ zip -j $ASSET.zip target/protoc-gen-scala
132131
133- - uses : actions/upload-artifact@v4
134- with :
135- name : ${{env.ASSET}}
136- path : ${{env.ASSET}}.zip
132+ - uses : actions/upload-artifact@v4
133+ with :
134+ name : ${{env.ASSET}}
135+ path : ${{env.ASSET}}.zip
137136
138137 gh_release :
139138 if : startsWith(github.ref, 'refs/tags/v')
140139 runs-on : ubuntu-20.04
141140 needs : [native, scalapbc]
142141 steps :
143- - uses : actions/checkout@v4
144- with :
145- fetch-depth : 0
146- - name : Download artifacts
147- uses : actions/download-artifact@v4
148- with :
149- path : artifacts
150- - name : Display structure of downloaded files
151- run : ls -R
152- working-directory : ./artifacts
153- - name : Create release
154- env :
155- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
156- run : |
157- set -x
158- assets=$(find ./artifacts -name "*.zip")
159- RELEASE_NAME=${GITHUB_REF#refs/tags/}
160- gh release create "$RELEASE_NAME" --generate-notes ${assets}
142+ - uses : actions/checkout@v4
143+ with :
144+ fetch-depth : 0
145+ - name : Download artifacts
146+ uses : actions/download-artifact@v4
147+ with :
148+ path : artifacts
149+ - name : Display structure of downloaded files
150+ run : ls -R
151+ working-directory : ./artifacts
152+ - name : Create release
153+ env :
154+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
155+ run : |
156+ set -x
157+ assets=$(find ./artifacts -name "*.zip")
158+ RELEASE_NAME=${GITHUB_REF#refs/tags/}
159+ gh release create "$RELEASE_NAME" --generate-notes ${assets}
0 commit comments