feat: helpers #48
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: Release Helpers | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'helpers/**' | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
# - name: Release | |
# uses: ./.github/actions/release | |
# with: | |
# module: "helpers" | |
- name: bump module version | |
id: module-tag | |
run: | | |
git fetch --tags | |
cd internal/release | |
echo "new-version=$(go run main.go helpers)" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: install git cliffs | |
env: | |
# renovate: datasource=github-tags depName=orhun/git-cliff versioning=semver | |
VERSION: 2.1.2 | |
run: | | |
curl --location --output /tmp/git-cliffs.tar.gz https://github.com/orhun/git-cliff/releases/download/v${VERSION}/git-cliff-${VERSION}-x86_64-unknown-linux-gnu.tar.gz | |
tar -xvzf /tmp/git-cliffs.tar.gz -C /tmp | |
mv /tmp/git-cliff-${VERSION}/git-cliff /usr/local/bin/ | |
shell: bash | |
- name: specify helpers | |
run: git cliff -u --tag ${{ steps.module-tag.outputs.new-version }} --include-path "helpers/*" | |
- name: generate release notes without specifying helpers | |
run: | | |
git cliff -u --tag ${{ steps.module-tag.outputs.new-version }} | tee notes.md | |
shell: bash | |
- name: Release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
cat notes.md | |
gh release create ${{ steps.module-tag.outputs.new-version }} --notes-file notes.md | |
git fetch --all | |
shell: bash | |
- name: Generate a changelog | |
uses: orhun/git-cliff-action@v3 | |
id: git-cliff-1 | |
with: | |
config: cliff.toml | |
args: -v --latest --include-path "helpers/*" | |
env: | |
OUTPUT: CHANGES1.md | |
- name: show changelog | |
run: echo " this is the first one ${{ steps.git-cliff-1.outputs.content }}" | |
- name: Generate a changelog | |
uses: orhun/git-cliff-action@v3 | |
id: git-cliff-2 | |
with: | |
config: cliff.toml | |
args: -v --latest | |
env: | |
OUTPUT: CHANGES.md | |
- name: show changelog | |
run: echo " this is the first second one ${{ steps.git-cliff-2.outputs.content }}" |