-
Notifications
You must be signed in to change notification settings - Fork 19
53 lines (47 loc) · 1.74 KB
/
buildAndTest.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
# This is a basic workflow to help you get started with Actions
name: build
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events for master and dev branches
push:
branches: [ master, dev, feature/addBuildActions ]
pull_request:
branches: [ master, dev, feature/addBuildActions ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
validate-cfg-files:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Validate config files
uses: KSP-CKAN/KSPMMCfgParser@master
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 100
- name: Assemble release
id: assemble-release
run: |
RELEASE_DIR="${RUNNER_TEMP}/release"
echo "Release dir: ${RELEASE_DIR}"
mkdir -v "${RELEASE_DIR}"
echo "::set-output name=release-dir::${RELEASE_DIR}"
cp -v -R "${GITHUB_WORKSPACE}/GameData" "${RELEASE_DIR}"
cp -v "${GITHUB_WORKSPACE}/README.md" "${RELEASE_DIR}"
cd ${RELEASE_DIR}
zip -r ROTanks-${{ github.event.release.tag_name }}.zip GameData README.md
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ROTanks
path: ${{ steps.assemble-release.outputs.release-dir }}/ROTanks-${{ github.event.release.tag_name }}.zip