ci: add pre-release test to stable

releases/v3
Scyu_ 2022-11-02 11:05:55 +00:00
parent 6c5522f8cd
commit 2b486595cd
No known key found for this signature in database
GPG Key ID: 740EB4CC9E4EFC10
2 changed files with 39 additions and 0 deletions

View File

@ -728,3 +728,38 @@ jobs:
env:
FILES: 'test-file.json'
EXPECTED_VERSION: '1.4.6-alpha.0'
test-pre-release-to-stable:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: "./"
- run: npm ci --prod
- run: "git config --global user.email 'changelog@github.com'"
- run: "git config --global user.name 'Awesome Github action'"
- run: "git add . && git commit --allow-empty -m 'feat: Added fake file so version will be bumped'"
- name: Generate changelog
id: changelog
uses: ./
env:
ENV: 'dont-use-git'
EXPECTED_TAG: 'v1.5.0'
with:
github-token: ${{ secrets.github_token }}
version-file: 'test-file-pre-release.json'
pre-release: false # This is the default value, but we want to be explicit
- name: Show file
run: |
echo "$(<test-file-pre-release.json)"
- name: Test output
run: node ./test-output.js
env:
FILES: 'test-file-pre-release.json'
EXPECTED_VERSION: '1.5.0'

View File

@ -0,0 +1,4 @@
{
"name": "Test JSON",
"version": "1.4.6-alpha.0"
}