Tag a release #5
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: Tag a release | |
on: | |
workflow_dispatch: | |
jobs: | |
version: | |
name: Create version number | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: "5.x" | |
- name: Use GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Create version.txt with nuGetVersion | |
run: echo ${{ steps.gitversion.outputs.nuGetVersion }} > version.txt | |
- name: Upload version.txt | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gitversion | |
path: version.txt | |
read-yaml: | |
name: Read YAML | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: read-yaml-file | |
uses: pietrobolcato/[email protected] | |
id: read_action_js | |
with: | |
config: ${{ github.workspace }}/pubspec.yaml | |
- name: use-yaml-file | |
run: | | |
echo version: ${{ steps.read_action_js.outputs['version'] }} | |
last-commits: | |
name: Get last commits | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
git log $(git describe --tags --abbrev=0)..HEAD --oneline --pretty=format:%h\ %s%n%b%- |