|
| 1 | +# description of this workflow, can be anything you want |
| 2 | +name: Package and release |
| 3 | + |
| 4 | +# we need to let GitHub know _when_ we want to release, typically only when we create a new tag. |
| 5 | +# this will target only tags, and not all pushes to the master branch. |
| 6 | +# this part can be heavily customized to your liking, like targeting only tags that match a certain word, |
| 7 | +# other branches or even pullrequests. |
| 8 | +on: |
| 9 | + push: |
| 10 | + tags: |
| 11 | + - '**' |
| 12 | + |
| 13 | +# a workflow is built up as jobs, and within these jobs are steps |
| 14 | +jobs: |
| 15 | + |
| 16 | + # "release" is a job, you can name it anything you want |
| 17 | + release: |
| 18 | + |
| 19 | + # we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet |
| 20 | + runs-on: ubuntu-latest |
| 21 | + |
| 22 | + # specify the environment variables used by the packager, matching the secrets from the project on GitHub |
| 23 | + env: |
| 24 | + # CF_API_KEY: ${{ secrets.CF_API_KEY }} |
| 25 | + # WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }} |
| 26 | + # WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} |
| 27 | + GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} # "GITHUB_TOKEN" is a secret always provided to the workflow |
| 28 | + # for your own token, the name cannot start with "GITHUB_" |
| 29 | + |
| 30 | + # "steps" holds a list of all the steps needed to package and release our AddOn |
| 31 | + steps: |
| 32 | + |
| 33 | + # we first have to clone the AddOn project, this is a required step |
| 34 | + - name: Clone project |
| 35 | + uses: actions/checkout@v3 |
| 36 | + with: |
| 37 | + fetch-depth: 0 # gets entire git history, needed for automatic changelogs |
| 38 | + |
| 39 | + # once cloned, we just run the GitHub Action for the packager project |
| 40 | + - name: Package and release |
| 41 | + uses: BigWigsMods/packager@v2 |
0 commit comments