-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (64 loc) · 1.99 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [ '**' ]
tags: [ '**' ]
pull_request:
branches: [ '**' ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1.3.0
with:
jvm: zulu:17
# - name: Check format
# run: ./millw __.checkFormat
- name: Compile all
run: ./millw __.compile
# - name: Scalafix check
# run: ./millw __.fix --check
# - name: Run tests
# run: ./millw __.test
- name: Setup GPG secrets for publish
run: |
gpg --version
cat <(echo "${{ secrets.GPG_SECRET_KEY }}") | base64 --decode | gpg --batch --import
- name: Publish to Nexus Repository
run: |
./millw GithubPackagesPublishModule.publishAll \
__.publishGithubPackages \
--token '${{ secrets.GITHUB_TOKEN }}' \
--githubOwner '${{ github.repository_owner }}' \
--githubRepository '${{ github.repository }}'
publish-notes:
name: Publish release notes
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/'))
needs: [ build ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Extract version from commit message
run: |
version=${GITHUB_REF#refs/*/}
echo "VERSION=$version" >> $GITHUB_ENV
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
- name: Publish release notes
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yaml
publish: true
name: "v${{ env.VERSION }}"
tag: "${{ env.VERSION }}"
version: "v${{ env.VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}