Deploy #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
if: ${{ !env.ACT }} | |
- name: Get Next Version | |
id: semver | |
uses: ./ | |
if: ${{ !env.ACT }} | |
with: | |
token: ${{ github.token }} | |
branch: main | |
- name: Create Draft Release | |
uses: ncipollo/[email protected] | |
if: ${{ !env.ACT }} | |
with: | |
prerelease: true | |
draft: false | |
commit: ${{ github.sha }} | |
tag: ${{ steps.semver.outputs.next }} | |
name: ${{ steps.semver.outputs.next }} | |
body: '*pending*' | |
token: ${{ github.token }} | |
- name: Update CHANGELOG | |
if: ${{ !env.ACT }} | |
id: changelog | |
uses: requarks/changelog-action@v1 | |
with: | |
token: ${{ github.token }} | |
tag: ${{ steps.semver.outputs.next }} | |
writeToFile: false | |
- name: Create Release | |
if: ${{ !env.ACT }} | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
draft: false | |
makeLatest: true | |
tag: ${{ steps.semver.outputs.next }} | |
name: ${{ steps.semver.outputs.next }} | |
body: ${{ steps.changelog.outputs.changes }} | |
token: ${{ github.token }} | |
- name: Create Release (Major-only) | |
if: ${{ !env.ACT }} | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
draft: false | |
commit: ${{ github.sha }} | |
tag: ${{ steps.semver.outputs.nextMajor }} | |
name: ${{ steps.semver.outputs.nextMajor }} | |
body: ${{ steps.changelog.outputs.changes }} | |
token: ${{ github.token }} | |
# LOCAL TEST | |
- name: (local) Checkout Code | |
uses: actions/checkout@v3 | |
if: ${{ env.ACT }} | |
with: | |
path: changelog-action | |
- name: (local) Update CHANGELOG | |
if: ${{ env.ACT }} | |
uses: ./ | |
with: | |
token: ${{ github.token }} | |
tag: ${{ env.GITHUB_REF_NAME }} |