Build #39
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: Build | |
on: | |
workflow_dispatch: | |
concurrency: | |
group: build | |
cancel-in-progress: false | |
jobs: | |
shellcheck: | |
name: Check | |
uses: ./.github/workflows/check.yml | |
release: | |
name: Release | |
needs: shellcheck | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Get previous tag | |
id: previousTag | |
run: | | |
name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -1) | |
echo "previousTag: $name" | |
echo "previousTag=$name" >> $GITHUB_ENV | |
- | |
name: Generate changelog | |
id: changelog | |
uses: requarks/changelog-action@v1 | |
with: | |
token: ${{ github.token }} | |
fromTag: ${{ github.ref_name }} | |
toTag: ${{ env.previousTag }} | |
writeToFile: false | |
reverseOrder: true | |
includeInvalidCommits: true | |
excludeTypes: "docs,build,chore" | |
- | |
name: Create a release | |
uses: action-pack/github-release@master | |
with: | |
tag: "v${{ vars.MAJOR }}.${{ vars.MINOR }}" | |
title: "v${{ vars.MAJOR }}.${{ vars.MINOR }}" | |
body: | | |
${{ steps.changelog.outputs.changes }} | |
**Full Changelog**: https://github.com/${{ github.repository }}/compare//${{ env.previousTag }}...v${{ vars.MAJOR }}.${{ vars.MINOR }} | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
- | |
name: Update major release | |
uses: action-pack/github-release@master | |
with: | |
tag: "v${{ vars.MAJOR }}" | |
title: "v${{ vars.MAJOR }}" | |
body: | | |
${{ steps.changelog.outputs.changes }} | |
**Full Changelog**: https://github.com/${{ github.repository }}/compare//${{ env.previousTag }}...v${{ vars.MAJOR }}.${{ vars.MINOR }} | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
- | |
name: Increment version variable | |
uses: action-pack/bump@v2 | |
with: | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
- | |
name: Send mail | |
uses: action-pack/send-mail@v1 | |
with: | |
to: ${{secrets.MAILTO}} | |
from: Github Actions <${{secrets.MAILTO}}> | |
connection_url: ${{secrets.MAIL_CONNECTION}} | |
subject: Build of ${{ github.event.repository.name }} v${{ vars.MAJOR }}.${{ vars.MINOR }} completed | |
body: | | |
The build job of ${{ github.event.repository.name }} v${{ vars.MAJOR }}.${{ vars.MINOR }} was completed successfully! | |
See https://github.com/${{ github.repository }}/actions for more information. |