Skip to content

Deploy

Deploy #24

Workflow file for this run

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/release-action@v1.12.0
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/release-action@v1.12.0
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/release-action@v1.12.0
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 }}