hugo-theme-relearn/.github/actions/release_milestone/action.yaml

95 lines
2.8 KiB
YAML
Raw Normal View History

2021-10-23 09:56:11 +00:00
name: Release milestone
description: Creates a release and tag out of a given milestone
2021-10-23 09:56:11 +00:00
inputs:
milestone:
description: Milestone for this release
required: true
github_token:
description: Secret GitHub token
required: true
runs:
using: composite
steps:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Close milestone
uses: Akkjon/close-milestone@v2
with:
milestone_name: ${{ env.MILESTONE }}
env:
MILESTONE: ${{ inputs.milestone }}
GITHUB_TOKEN: ${{ inputs.github_token }}
- name: Create provisionary tag
shell: bash
env:
MILESTONE: ${{ inputs.milestone }}
GITHUB_TOKEN: ${{ inputs.github_token }}
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git tag --message "" "$MILESTONE"
git push origin "$MILESTONE"
- name: Update changelog
shell: bash
env:
MILESTONE: ${{ inputs.milestone }}
GITHUB_TOKEN: ${{ inputs.github_token }}
GREN_GITHUB_TOKEN: ${{ inputs.github_token }}
run: |
echo -n "$MILESTONE" > layouts/partials/version.txt
2021-10-23 09:56:11 +00:00
npx github-release-notes@0.17.1 changelog --generate --override --tags=all
git add *
git commit --message "Ship tag $MILESTONE"
git push origin main
- name: Create final tag
shell: bash
env:
MILESTONE: ${{ inputs.milestone }}
GITHUB_TOKEN: ${{ inputs.github_token }}
run: |
git tag --force --message "" "$MILESTONE"
git push --force origin "$MILESTONE"
- name: Publish release
shell: bash
env:
MILESTONE: ${{ inputs.milestone }}
GREN_GITHUB_TOKEN: ${{ inputs.github_token }}
run: |
npx github-release-notes@0.17.1 release --tags "$MILESTONE"
- name: Update version number to mark non-release version
shell: bash
env:
MILESTONE: ${{ inputs.milestone }}
GITHUB_TOKEN: ${{ inputs.github_token }}
GREN_GITHUB_TOKEN: ${{ inputs.github_token }}
run: |
echo -n "$MILESTONE+tip" > layouts/partials/version.txt
git add *
2022-02-11 08:40:22 +00:00
git commit --message "Mark non-release version"
git push origin main
- name: Generate next version number
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ env.MILESTONE }}
env:
MILESTONE: ${{ inputs.milestone }}
GITHUB_TOKEN: ${{ inputs.github_token }}
- name: Create next patch milestone
uses: "WyriHaximus/github-action-create-milestone@v1"
with:
title: ${{ steps.semvers.outputs.patch }}
env:
MILESTONE: ${{ inputs.milestone }}
GITHUB_TOKEN: ${{ inputs.github_token }}