Skip to content

Next release

Next release #14

Workflow file for this run

name: release
on:
pull_request:
branches:
- main
types: [closed]
jobs:
tag_and_release:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Calendar Version
id: calendar-version
uses: harm-matthias-harms/calendar-version@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.calendar-version.outputs.new-tag }}-alpha
skipIfReleaseExists: true
generateReleaseNotes: true
changelog:
needs: [tag_and_release]
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.adoc
GITHUB_REPO: ${{ github.repository }}
- run: |
git diff
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git add CHANGELOG.adoc
git commit -m "Update CHANGELOG" || exit 0
git push origin main
git fetch origin dev
git switch dev
git rebase main
git push origin dev
# create_pull_request:
# needs: [changelog]
# runs-on: ubuntu-latest
# permissions:
# pull-requests: write
# steps:
# - uses: actions/checkout@v4
# - name: Create a pull request
# uses: actions/github-script@v7
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# script: |
# const headRef = '${{ steps.pull_request_head.outputs.ref }}'
# const createParams = {
# owner: context.repo.owner,
# repo: context.repo.repo,
# base: 'main',
# head: 'dev',
# title: 'Next release'
# }
# const { data } = await github.rest.pulls.create(createParams)
# return data