Deploy #24
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@v2 | |
if: ${{ !env.ACT }} | |
with: | |
fetch-depth: 0 | |
- name: Get Next Version | |
id: semver | |
uses: ietf-tools/semver-action@v1 | |
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: ./ | |
with: | |
token: ${{ github.token }} | |
tag: ${{ steps.semver.outputs.next }} | |
- 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 }} | |
- name: Commit CHANGELOG.md | |
if: ${{ !env.ACT }} | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
branch: main | |
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]' | |
file_pattern: CHANGELOG.md | |
# LOCAL TEST | |
- name: (local) Checkout Code | |
uses: actions/checkout@v2 | |
if: ${{ env.ACT }} | |
with: | |
path: changelog-action | |
- name: (local) Update CHANGELOG | |
if: ${{ env.ACT }} | |
uses: ./ | |
with: | |
token: ${{ github.token }} | |
tag: ${{ env.GITHUB_REF_NAME }} |