Skip to content

Commit 970d13b

Browse files
committed
Add workflow to build on release
Attempt 1
1 parent e40317f commit 970d13b

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Builds when a release is published.
2+
name: Build Workflow
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
run:
10+
name: Build Release Package
11+
runs-on: ubuntu-20.04
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
with:
16+
submodules: true
17+
18+
- name: Setup SourcePawn Compiler
19+
uses: rumblefrog/setup-sp@master
20+
with:
21+
version: "1.10.x"
22+
23+
- name: Setup Ninja Build
24+
uses: ashutoshvarma/setup-ninja@master
25+
with:
26+
version: 1.10.0
27+
28+
- name: Build Files
29+
run: |
30+
python3 configure.py
31+
ninja
32+
33+
- name: Upload Include
34+
id: upload-release-include
35+
uses: actions/upload-release-asset@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
with:
39+
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
40+
asset_path: ./build/scripting/include/tf2utils.inc
41+
asset_name: tf2utils.inc
42+
asset_content_type: text/plain
43+
44+
- name: Upload Plugin
45+
id: upload-release-plugin
46+
uses: actions/upload-release-asset@v1
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
with:
50+
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
51+
asset_path: ./build/plugins/tf2utils.smx
52+
asset_name: tf2utils.smx
53+
asset_content_type: application/octet-stream
54+
55+
- name: Upload Game Config
56+
id: upload-release-gamedata
57+
uses: actions/upload-release-asset@v1
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
with:
61+
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
62+
asset_path: ./build/gamedata/tf2.utils.nosoop.txt
63+
asset_name: tf2.utils.nosoop.txt
64+
asset_content_type: text/plain

0 commit comments

Comments
 (0)