-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 2.98 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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Release
on:
push:
tags:
# This will only run the release workflow when it's tagged with a version
# tag.
- "v*"
jobs:
build:
uses: ./.github/workflows/build.yml
with:
artifact-suffix: Release
package:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Set Environment Variables
run: |
echo "MOD_PATH=./RealisticOrbitalTrade" >> $GITHUB_ENV
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "NO_PREFIX_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Create Mod Folder
run: mkdir -p ${{ env.MOD_PATH }}
- name: Download Mod Artifacts from Build Step
uses: actions/download-artifact@v4
with:
name: RealisticOrbitalTrade-Release
path: ${{ env.MOD_PATH }}
- name: Zip Mod
run: zip -r ${{ env.MOD_PATH }}.zip ${{ env.MOD_PATH }}/*
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ env.NO_PREFIX_VERSION }}
path: ${{ env.MOD_PATH }}/CHANGELOG.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
body: ${{ steps.changelog_reader.outputs.changes }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.MOD_PATH }}.zip
asset_name: RealisticOrbitalTrade-${{ env.VERSION }}.zip
asset_content_type: application/zip
- name: Converts Markdown to Steam markup
id: markdown_steam
uses: ilyvion/steamdown@main
with:
markdown: ${{ steps.changelog_reader.outputs.changes }}
- name: Upload to Steam Workshop
uses: ZehMatt/steam-workshop-upload@569de82c2fdf3042af8491379fb698829ba63a9d
with:
appid: 294100
itemid: 3236257897
path: ${{ env.MOD_PATH }}
changenote: ${{ steps.markdown_steam.outputs.steam-markup }}
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
STEAM_TFASEED: ${{ secrets.STEAM_TFASEED }}