-
Notifications
You must be signed in to change notification settings - Fork 18
41 lines (35 loc) · 1.23 KB
/
Release.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
name: Create release draft
on: push
jobs:
build:
runs-on: ubuntu-latest
if: |
(contains(github.event.head_commit.message,'[release]') ||
contains(github.event.head_commit.message,'[update]')) &&
github.repository == '3Snake3/Sapphirium'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Zip mod
run: |
cd ../
python Sapphirium/.github/workflows/upload/release.py
- name: Create release draft
if: ${{ contains(github.event.head_commit.message,'[release]') }}
run: |
gh release create new --draft *.jar
- name: Fetch latest version
id: fetchTag
if: ${{ contains(github.event.head_commit.message,'[update]') }}
run: |
pip install -r Sapphirium/.github/workflows/requirements.txt
python Sapphirium/.github/workflows/upload/fetch.py
- name: Update release
if: ${{ contains(github.event.head_commit.message,'[update]') }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.retrieveMeta.outputs.fetchTag }}
run: |
gh release upload "$VERSION" *.jar --clobber