Merge pull request #247 from carlfriedrich/improve-release-actions

Improve release actions
This commit is contained in:
Tim 2022-11-24 15:31:01 +01:00 committed by GitHub
commit 98321ef05a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 24 deletions

View file

@ -2,9 +2,11 @@
set -e
head_tag=$(git describe --exact-match 2>/dev/null | true)
head_tag=$(git describe --exact-match 2>/dev/null || true)
if [[ ${head_tag} =~ [\d{2}.\d{2}.\d+] ]]
git log --color=always --format="%C(auto)%h %s%d" | head
if [[ ${head_tag} =~ [\d{2}\.\d{2}\.\d+] ]]
then
echo "Current master already has version tag ${head_tag}"
else
@ -13,6 +15,7 @@ else
version=$(date +'%y.%m.0')
git tag -a ${version} -m "Release ${version}"
git push origin ${version}
git log --color=always --format="%C(auto)%h %s%d" | head -1
echo "Pushed new tag:"
echo "${{github.server_url}}/${{github.repository}}/tag/${version}"
echo "${REPO_URL}/releases/tag/${version}"
fi

View file

@ -12,7 +12,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

View file

@ -1,20 +1,22 @@
name: Tag
on:
schedule:
# Run on every first day of the month
- cron: '0 0 1 * *'
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create Tag
run: .github/scripts/tag.sh
name: Tag
on:
schedule:
# Run on every first day of the month
- cron: '0 0 1 * *'
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Tag
run: .github/scripts/tag.sh
env:
REPO_URL: ${{github.server_url}}/${{github.repository}}