51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: 'build-test'
|
|
on: # rebuild any PRs and main branch changes
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
|
|
jobs:
|
|
build: # make sure build/ci work properly
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: |
|
|
npm install
|
|
- run: |
|
|
npm run all
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
test: # make sure the action works on a clean machine without building
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0 # Checkout full depth so tags can be discovered automatically if not specified
|
|
|
|
- name: "Minimal Configuration"
|
|
id: minimal_release
|
|
uses: ./
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Echo Minimal
|
|
run: echo "${{steps.minimal_release.outputs.changelog}}"
|
|
|
|
- name: "Complex Configuration"
|
|
id: complex_release
|
|
uses: ./
|
|
with:
|
|
configuration: "configuration_complex.json"
|
|
owner: "mikepenz"
|
|
repo: "release-changelog-builder-action"
|
|
fromTag: "v0.0.2"
|
|
toTag: "v0.0.3"
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Echo Complex
|
|
run: echo "${{steps.complex_release.outputs.changelog}}"
|
|
|