Create Release #46
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: Create Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build_release: | |
name: build_release | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: version | |
run: echo "version=$(make get-version)" >> $GITHUB_OUTPUT | |
id: version | |
- name: Get Hash | |
id: hash | |
run: echo "git_hash=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_OUTPUT | |
- name: build artifacts | |
run: make package | |
- name: Create Changelog | |
uses: saadmk11/changelog-ci@v1.1.2 | |
id: changelog_ci | |
with: | |
changelog_filename: CHANGELOG.md | |
release_version: ${{ steps.version.outputs.version }} | |
config_file: .github/changelogConfig.yml | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Repo Attributes | |
id: attrs | |
uses: ibnesayeed/repo-attrs@master | |
- name: release | |
uses: ncipollo/release-action@v1 | |
id: create_release | |
with: | |
draft: false | |
prerelease: false | |
name: Leantime v${{ steps.version.outputs.version }} | |
tag: v${{ steps.version.outputs.version }} | |
generateReleaseNotes: false | |
makeLatest: true | |
body: | | |
## Changes in this Release | |
History from `${{ steps.attrs.outputs.tail }}` to `${{ steps.attrs.outputs.head }}` | |
### Commits | |
${{ steps.attrs.outputs.commits }} | |
### Contributors | |
${{ steps.attrs.outputs.contributors }} | |
### Files | |
``` | |
${{ steps.attrs.outputs.files }} | |
``` | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: upload zip | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/Leantime-v${{ steps.version.outputs.version }}.zip | |
asset_name: Leantime-v${{ steps.version.outputs.version }}.zip | |
asset_content_type: application/gzip | |
- name: upload tar | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/Leantime-v${{ steps.version.outputs.version }}.tar.gz | |
asset_name: Leantime-v${{ steps.version.outputs.version }}.tar.gz | |
asset_content_type: application/gzip |