-
Notifications
You must be signed in to change notification settings - Fork 241
107 lines (103 loc) · 3.02 KB
/
release.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Release
on:
push:
branches:
- main
tags:
- "v*"
jobs:
release:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/[email protected]
with:
jvm: 8
- run: echo "$PGP_SECRET" | base64 --decode | gpg --batch --import
shell: bash
env:
PGP_SECRET: ${{ secrets.PUBLISH_SECRET_KEY }}
- run: |
mv .mill-jvm-opts .mill-jvm-opts.bak
cat .mill-jvm-opts.bak | grep -v Xmx > .mill-jvm-opts
# sometimes running into memory issues when attempting __.publishLocal or __.publishArtifacts upfront
for SV in $(./mill dev.scalaVersions); do
./mill -i '__['"$SV"'].compile'
./mill -i '__['"$SV"'].docJar'
./mill -i '__['"$SV"'].publishLocal'
done
./mill -i __.publishLocal
./mill -i ci.publishSonatype __.publishArtifacts
shell: bash
env:
PGP_PASSWORD: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
upload-launcher:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/[email protected]
with:
jvm: 8
- run: ./mill -i ci.uploadLaunchers
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
env:
UPLOAD_GH_TOKEN: ${{ secrets.GH_TOKEN }}
update-docker-images:
needs: release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'almond-sh/almond'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/[email protected]
with:
jvm: 8
- run: scripts/update-docker-images.sh
shell: bash
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
update-website:
needs: [upload-launcher, update-docker-images]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/[email protected]
with:
jvm: 17
apps: cs
- run: |
./mill docs.generate --npm-install --yarn-run-build
scripts/website0/versioned-docs.sh --update
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
WEBSITE_DIR: docs/website
VERSIONED_DOCS_REPO: almond-sh/versioned-docs
- run: |
scripts/website0/versioned-docs.sh
./mill docs.generate --npm-install --yarn-run-build --relativize
scripts/website0/push-website.sh
shell: bash
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
WEBSITE_DIR: docs/website
REPO: almond-sh/almond
VERSIONED_DOCS_REPO: almond-sh/versioned-docs