create dist build #9
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: release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get next version | |
uses: jveldboom/action-conventional-versioning@v1 | |
id: version | |
- name: Create GitHub Release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh release create "${{ steps.version.outputs.version-with-prefix }}" \ | |
--generate-notes \ | |
--target "${{ github.sha }}" | |
- name: Update Major Tag | |
env: | |
MAJOR: ${{ steps.version.outputs.major-with-prefix }} | |
run: | | |
git tag -d "${MAJOR}" || true | |
git push origin ":refs/tags/${MAJOR}" | |
git tag "${MAJOR}" "${GITHUB_SHA}" | |
git push origin "${MAJOR}" |