-
Notifications
You must be signed in to change notification settings - Fork 66
64 lines (62 loc) · 2.01 KB
/
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
name: Snapshot Release
on:
push:
branches:
- main
paths:
- '**.scala'
- '**.java'
- '**.sbt'
- '.github/workflows/snapshot.yml'
tag:
- '!v*'
jobs:
publish_snapshots:
name: Publish snapshots
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Fetch all tags so that sbt-dynver can find the previous release version
fetch-depth: 0
- run: git fetch --tags
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
- name: Get Airframe version
run: echo "AIRFRAME_VERSION=$(./scripts/dynver.sh)" >> $GITHUB_ENV
- name: Check Airframe version
run: echo ${AIRFRAME_VERSION}
- name: Post version number to Slack
id: slack
uses: slackapi/slack-github-action@v1.27.0
with:
# wvlet dev-snapshot channel
channel-id: 'C04CC79BZ7A'
slack-message: "Publishing a snapshot version of airframe: `${{ env.AIRFRAME_VERSION }}`"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Publish snapshots
env:
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USER }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASS }}'
run: |
./sbt publishSnapshots
- name: Publish snapshots of AirSpec
env:
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USER }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASS }}'
run: |
../sbt publishSnapshots
working-directory: ./airspec
- name: Notify the completion to Slack
uses: slackapi/slack-github-action@v1.27.0
with:
# wvlet dev-snapshot channel
channel-id: 'C04CC79BZ7A'
# Update the thread
update-ts: ${{ steps.slack.outputs.ts }}
slack-message: "[done] Published a snapshot version of airframe: `${{ env.AIRFRAME_VERSION }}`"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}