-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (33 loc) · 954 Bytes
/
publish.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
name: publish
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
- name: Extract version from release tag
id: extract_version
run: |
version=$(echo "${GITHUB_REF#refs/tags/}")
echo "VERSION=$version" >> $GITHUB_ENV
- name: Update SBT version in build.sbt
run: |
sed -i "s/ThisBuild \/ version := .*/ThisBuild \/ version := \"$VERSION\"/" build.sbt
- name: Compile
run: sbt compile
# - name: Publish
# env:
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
# run: sbt publish
- name: Publish
env:
GITHUB_USERNAME: ${{ secrets.GITHUB_ACTOR }}
GITHUB_ACTOR: ${{ secrets.GITHUB_TOKEN }}
run: sbt publish