-
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 2.02 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
# description of this workflow, can be anything you want
name: Package and Release
# we need to let GitHub know _when_ we want to release, typically only when we create a new tag.
# this will target only tags, and not all pushes to the master branch.
# this part can be heavily customized to your liking, like targeting only tags that match a certain word,
# other branches or even pullrequests.
# this tag schema only fires on version numbers, though isn't as good as regex "/^v\d+\.\d+(\.\d+)?(-\S*)?$/"
# workflow_run is used since a workflow can't be triggered by a tag made by another workflow without OAuth
on:
push:
tags:
- v[0-9]+.[0-9]+*
workflow_run:
workflows: ["Bump Version"]
types:
- completed
# a workflow is built up as jobs, and within these jobs are steps
jobs:
# "release" is a job, you can name it anything you want
release:
# we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet
runs-on: ubuntu-latest
# specify the environment variables used by the packager, matching the secrets from the project on GitHub
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} # "GITHUB_TOKEN" is a secret always provided to the workflow
# for your own token, the name cannot start with "GITHUB_"
# "steps" holds a list of all the steps needed to package and release our AddOn
steps:
# we first have to clone the AddOn project, this is a required step
- name: Clone Project
uses: actions/checkout@v1
with:
# you can specify how much of the commit history you want to fetch,
# which is useful for controlling the length of the automated changelog
fetch-depth: 50
# once cloned, we just run the GitHub Action for the packager project
- name: Package and Release
uses: BigWigsMods/packager@v2