Skip to content

Commit 2794500

Browse files
committed
Detect Native snapshot to use from dispatch event payload
1 parent 98a4308 commit 2794500

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ jobs:
1212
name: Publish
1313
runs-on: ubuntu-22.04
1414
if: github.repository == 'scala-native/scala-native-cli'
15+
env:
16+
# Present only for repository_dispatch; empty for tag push / manual runs
17+
CI_NATIVE_VERSION: ${{ github.event.client_payload.version || '' }}
1518
steps:
1619
- uses: actions/checkout@v3
1720
- uses: coursier/cache-action@v6
1821
- uses: coursier/setup-action@v1
1922
with:
2023
jvm: adopt:8
24+
apps: sbt
2125

2226
- name: Setup PGP Key
2327
run: |

build.sbt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
import scala.util.Properties.envOrNone
12
import scala.scalanative.nir.Proxy.nativeBinaryVersion
23

4+
val ScalaNativeVersion = envOrNone("CI_NATIVE_VERSION")
5+
.filterNot(_.isEmpty)
6+
.getOrElse("0.5.8")
37

48
val crossScalaVersions212 = (14 to 20).map("2.12." + _)
59
val crossScalaVersions213 = (8 to 17).map("2.13." + _)

0 commit comments

Comments
 (0)