name: Create Tag on: workflow_dispatch: inputs: tagName: description: 'Tag name:' type: string required: true run-name: "Generating changelog for Release v${{github.event.inputs.tagName}}" jobs: generate_changelog: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 with: ref: ${{ github.head_ref }} token: ${{ secrets.TOKEN }} - name: Setup .NET uses: actions/setup-dotnet@v1 with: dotnet-version: '8.0.x' - name: Update Project Versions run: sed -i "s/\(\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj" - name: Update Project Versions run: sed -i "s/\(\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj" - name: Build and Run Changelog Generator run: dotnet run --project "./OmegaLeo.HelperLib.ChangelogHandler/OmegaLeo.HelperLib.ChangelogHandler.csproj" env: UNITYFLOW_SECRET: ${{ secrets.TOKEN }} - name: Create Tag run: | git config --local user.email "nunodiogo@omegaleo.pt" git config --local user.name "Nuno Diogo" git add . git commit -m "Automatically generated changelog for v${{github.event.inputs.tagName}}" git tag -a "${{ github.event.inputs.tagName }}" -m "Release ${{ github.event.inputs.tagName }}" git push origin "${{ github.event.inputs.tagName }}"