-
Notifications
You must be signed in to change notification settings - Fork 79
49 lines (42 loc) · 1.53 KB
/
create-release-artifacts.yml
File metadata and controls
49 lines (42 loc) · 1.53 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
name: Release Artifacts
on:
release:
types: [published]
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Download and unpack MassBank CLI tools
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
shopt -s nullglob
gh release download --repo MassBank/MassBank-cli-tools --pattern 'MassBank-cli-tools-*.zip' --dir .scripts
files=(.scripts/MassBank-cli-tools-*.zip)
if [ ${#files[@]} -eq 0 ]; then
echo "No MassBank-cli-tools zip found via gh"
exit 1
fi
for f in "${files[@]}"; do unzip -o "$f" -d .scripts; done
rm -f .scripts/MassBank-cli-tools-*.zip
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Prepare release files
run: |
set -euo pipefail
shopt -s nullglob
.scripts/MassBank-cli-tools/bin/RecordExporter -f RIKEN_MSP -o MassBank_RIKENformat.msp $(ls -d ./*/)
.scripts/MassBank-cli-tools/bin/RecordExporter -f NIST_MSP -o MassBank_NISTformat.msp $(ls -d ./*/)
.scripts/MassBank-cli-tools/bin/RecordExporter -f jsonld -o MassBank.json $(ls -d ./*/)
- name: Upload release asset
uses: softprops/action-gh-release@v2
with:
files: |
MassBank_RIKENformat.msp
MassBank_NISTformat.msp
MassBank.json