Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Tag for release
on:
push:
paths:
- configure.ac
branches:
- 'main'
jobs:
tag_release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get tag name
id: get-tag
run: echo "TAGNAME=`grep -o -E '?[0-9]{4}\.[0-9]{2}(\.[0-9]{2})?' configure.ac`" >> "$GITHUB_OUTPUT"
- name: Create tag
uses: actions/github-script@v5
env:
TAG: ${{ steps.get-tag.outputs.TAGNAME }}
with:
script: |
const title = process.env.TAG;
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${title}`,
sha: context.sha
})
21 changes: 21 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# appends -dev to the version upon release and opens pr
# CI won't run on generated PR, easiest workaround is to close + reopen
on:
release:
types: [published]
jobs:
add-dev-to-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Append version with dev
run: sed -i '/20[0-9][0-9]\.[0-9][0-9]/ s/]/-dev]/' configure.ac
- name: Create pull request
uses: peter-evans/create-pull-request@v7.0.6
with:
base: main # creates a new branch off of main
branch: add-dev-post-release # name of the created branch
branch-suffix: timestamp # add a timestamp to branch name
delete-branch: true # delete afer merge
title: Append dev to version number post-release
body: automated change, adds '-dev' to the version number upon releases. This PR will need to be closed and reopened to run CI testing.