-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (54 loc) · 1.75 KB
/
prep_release.yml
File metadata and controls
66 lines (54 loc) · 1.75 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
65
66
name: Prepare Viash Release
on:
workflow_dispatch:
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Set up sbt
uses: sbt/setup-sbt@v1
- name: Set up Scala
run: |
sudo apt-get update
sudo apt-get install -y scala
- name: Build Viash
run: |
./configure
make
make tools
bin/viash export json_schema --format=json --output=bin/schema.json
- name: Get Version
id: get_version
run: |
viash_version=$(bin/viash --version | cut -d ' ' -f 2)
echo "Detected Viash version: $viash_version"
echo "viash_version=$viash_version" >> "$GITHUB_OUTPUT"
# fetch relevant changelog section
changelog_section=$(awk "/# Viash ${viash_version}.*/{flag=1;next}/^# /{flag=0}flag" CHANGELOG.md)
echo "changelog_section<<GITHUB_EOF" >> "$GITHUB_OUTPUT"
echo "$changelog_section" >> "$GITHUB_OUTPUT"
echo "GITHUB_EOF" >> "$GITHUB_OUTPUT"
- name: Create release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.viash_version }}
target_commitish: ${{ github.sha }}
name: Viash ${{ steps.get_version.outputs.viash_version }}
body: ${{ steps.get_version.outputs.changelog_section }}
draft: true
fail_on_unmatched_files: true
files: |
bin/viash
bin/schema.json
bin/viash_install