diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1851435 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release + +on: + workflow_dispatch: {} + +jobs: + get-version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.changelog.outputs.version }} + steps: + - uses: actions/checkout@v4 + + - name: Extract version from CHANGELOG.md + id: changelog + run: | + version=$(grep -m 1 -oP '^##\s*\[\K[0-9]+\.[0-9]+\.[0-9]+' CHANGELOG.md) + echo "version=$version" >> $GITHUB_OUTPUT + tag: + needs: get-version + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Create and push git tag + run: | + version=${{ needs.get-version.outputs.version }} + + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git tag "v$version" + git push origin "v$version" + docker: + needs: get-version + uses: ./.github/workflows/docker_build.yml + with: + version: ${{ needs.get-version.outputs.version }} + secrets: inherit + + nuget: + needs: get-version + uses: ./.github/workflows/dotnet_tool_build.yml + with: + version: ${{ needs.get-version.outputs.version }} + secrets: inherit diff --git a/.github/workflows/release_prep.yml b/.github/workflows/release_prep.yml index 5e3ece8..f3feed3 100644 --- a/.github/workflows/release_prep.yml +++ b/.github/workflows/release_prep.yml @@ -30,8 +30,8 @@ jobs: - name: "commit changes" run: | - git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com" - git config --local user.name "GitHub Actions" + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" git add . git commit -m "Release prep v${{ github.event.inputs.version }}" diff --git a/src/BuslyCLI.Console/BuslyCLI.Console.csproj b/src/BuslyCLI.Console/BuslyCLI.Console.csproj index d86f33f..f80ed53 100644 --- a/src/BuslyCLI.Console/BuslyCLI.Console.csproj +++ b/src/BuslyCLI.Console/BuslyCLI.Console.csproj @@ -7,8 +7,8 @@ BuslyCLI true - dotnet-busly-cli - busly-cli + dotnet-busly + dotnet-busly diff --git a/website/docs/getting-started/quick-start.mdx b/website/docs/getting-started/quick-start.mdx index 1068d7e..b36176f 100644 --- a/website/docs/getting-started/quick-start.mdx +++ b/website/docs/getting-started/quick-start.mdx @@ -32,7 +32,8 @@ docker run --rm tragiccode/busly-cli --help ```bash -dotnet tool install --global dotnet-busly-cli +dotnet tool install --global dotnet-busly +dotnet-busly --help ```