forked from scala-native/scala-native
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (68 loc) · 2.69 KB
/
publishForScalaRelease.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Flow dedicated to publishing compiler plugins for Scala 3 RC versions
name: Publish for Scala release
on:
workflow_dispatch:
inputs:
scala-version:
type: string
description: "Version of Scala for which plugins and scalalib should be published"
default: ""
scala-native-version:
type: string
description: "Tag of Scala Native release which should be used for release"
jobs:
publish:
name: Publish
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.scala-native-version }}
- uses: ./.github/actions/linux-setup-env
with:
scala-version: ${{ inputs.scala-version }}
java-version: 8
- name: Setup PGP Key
run: |
echo -n "$PGP_SECRET" | base64 --decode | gpg --batch --import
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
- name: Publish release 0.4.x
if: ${{ startsWith(inputs.scala-native-version, 'v0.4.') }}
env:
MAVEN_USER: "${{ secrets.SONATYPE_USER }}"
MAVEN_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
PGP_PASSPHRASE: "${{ secrets.PGP_PASSWORD }}"
run: >
sbt '
set crossScalaVersions += "${{ inputs.scala-version }}";
set nscPlugin.forBinaryVersion("${{ env.binary-version }}")/crossScalaVersions += "${{ inputs.scala-version }}";
set junitPlugin.forBinaryVersion("${{ env.binary-version }}")/crossScalaVersions += "${{ inputs.scala-version }}";
++${{ inputs.scala-version }} -v;
nscplugin${{ env.project-version }}/test;
nscplugin${{ env.project-version }}/publishSigned;
junitPlugin${{ env.project-version }}/publishSigned;
'
- name: Publish release 0.5.x
if: ${{ startsWith(inputs.scala-native-version, 'v0.5.') }}
env:
MAVEN_USER: "${{ secrets.SONATYPE_USER }}"
MAVEN_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
PGP_PASSPHRASE: "${{ secrets.PGP_PASSWORD }}"
EXTRA_CROSS_SCALA_VERSION: "${{ inputs.scala-version }}"
run: >
sbt '
++${{ inputs.scala-version }} -v;
nscplugin${{ env.project-version }}/publishSigned;
junitPlugin${{ env.project-version }}/publishSigned;
scalalib${{ env.project-version }}/publishSigned
'
- name: Test runtime
if: ${{ startsWith(inputs.scala-native-version, 'v0.5.') }}
env:
EXTRA_CROSS_SCALA_VERSION: "${{ inputs.scala-version }}"
run: >
sbt '
++${{ inputs.scala-version }} -v;
test-runtime ${{ env.binary-version }};
'