-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.66 KB
/
release.yml
File metadata and controls
64 lines (53 loc) · 1.66 KB
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: Release
on:
release:
types: [created]
workflow_dispatch:
inputs:
tag:
description: 'Release tag to build for (e.g., 1.3.4)'
required: true
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AKKA_REPO_TOKEN: ${{ secrets.AKKA_REPO_TOKEN }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || github.event.inputs.tag }}
fetch-depth: 0
- name: Setup JDK 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
- name: Set Up SBT
uses: sbt/setup-sbt@v1
- name: Coursier Caching
uses: coursier/cache-action@v6
- name: Build, Test, and Publish
run: sbt -v clean test publish
- name: Collect Artifacts
run: |
mkdir -p staging
cp target/scala-2.12/sbt-1.0/sbt-ossuminc-*.jar staging/
ls -la staging/
- name: Upload Artifacts to Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ github.event.release.tag_name || github.event.inputs.tag }}"
gh release upload "$TAG" staging/*.jar --clobber
- name: Cleanup Before Caching
shell: bash
run: |
rm -rf "$HOME/.ivy2/local" || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true