-
Notifications
You must be signed in to change notification settings - Fork 16
83 lines (80 loc) · 3 KB
/
publish_snapshot.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
74
75
76
77
78
79
80
81
82
83
name: Publish snapshot
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
COURSIER_REPOSITORIES: central|https://s01.oss.sonatype.org/content/repositories/snapshots|jitpack|https://corporate.com/repo
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
jobs:
cross:
strategy:
fail-fast: false
matrix:
# a list of all the targets
include:
- TARGET: x86_64-pc-windows-msvc
OS: windows-latest
- TARGET: x86_64-apple-darwin
OS: macos-latest
- TARGET: aarch64-apple-darwin
OS: macos-latest
runs-on: ${{ matrix.OS }}
env:
NAME: rust cross compile
TARGET: ${{ matrix.TARGET }}
OS: ${{ matrix.OS }}
MILL_RUST_TARGET: ${{ matrix.TARGET }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.TARGET }}
override: true
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- run: chmod +x millw
- run: ./millw fastbloomjvm.compileNative
- uses: actions/upload-artifact@v3
with:
name: result
path: out/fastbloomjvm/compileNative.dest/native/
- run: ls -R out/fastbloomjvm/compileNative.dest/native/
deploy:
needs: cross
runs-on: ubuntu-22.04
env:
MILL_RUST_TARGET: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- run: chmod +x millw
- run: ./millw fastbloomjvm.compileNative
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: result
path: out/fastbloomjvm/compileNative.dest/native/
- run: ls -R out/fastbloomjvm/compileNative.dest/native/
- run: ./millw fastbloomjvm.jar
- run: ls -R out/fastbloomjvm/compileNative.dest/native/
- run: echo $PGP_SECRET | base64 --decode > gpg_key && gpg --import --no-tty --batch --yes gpg_key
- run: ./millw -i __.publishArtifacts
- run: ls -R out/fastbloomjvm/compileNative.dest/native/
- run: gpg --passphrase=$PGP_PASSPHRASE --no-tty --pinentry-mode loopback --batch --yes -a -b build.sc
- run: ./millw -d mill.scalalib.PublishModule/publishAll --publishArtifacts __.publishArtifacts --sonatypeCreds yankun1992:$SONATYPE_PASSWORD --gpgArgs --passphrase=$PGP_PASSPHRASE,--no-tty,--pinentry-mode,loopback,--batch,--yes,-a,-b --sonatypeUri https://s01.oss.sonatype.org/service/local --sonatypeSnapshotUri https://s01.oss.sonatype.org/content/repositories/snapshots --readTimeout 600000 --awaitTimeout 600000 --signed true
- run: rm gpg_key