From c213ce8ccaf79a355a28b75d83fa84347a38d1fb Mon Sep 17 00:00:00 2001 From: "Michael F." Date: Fri, 5 Jan 2024 14:37:36 +0100 Subject: [PATCH] release 24.01.0, update changelog, better ci handling --- .github/workflows/create-release.yaml | 31 +++++++++++++++++++ .github/workflows/github-packages-publish.yml | 11 ++++--- CHANGELOG.md | 4 ++- Makefile | 6 ++-- 4 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/create-release.yaml diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml new file mode 100644 index 0000000..21b1b81 --- /dev/null +++ b/.github/workflows/create-release.yaml @@ -0,0 +1,31 @@ +name: Create release + +on: + workflow_dispatch: + push: + tags: + - v*.*.[0-9]+ + +permissions: + contents: write + +jobs: + release: + name: Release pushed tag + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Filter CHANGELOG + run: | + sed '1,/## \[/d;/## \[/Q' CHANGELOG.md > CHANGELOG_LATEST.md + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + run: | + gh release create "${{ github.ref_name }}" \ + --repo="$GITHUB_REPOSITORY" \ + --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ + -F CHANGELOG_LATEST.md \ + --generate-notes \ No newline at end of file diff --git a/.github/workflows/github-packages-publish.yml b/.github/workflows/github-packages-publish.yml index 9eb2b2c..baa4620 100644 --- a/.github/workflows/github-packages-publish.yml +++ b/.github/workflows/github-packages-publish.yml @@ -1,4 +1,4 @@ -name: Docker +name: Publish to Github Docker Hub # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by @@ -6,13 +6,15 @@ name: Docker # documentation. on: + # schedule: + # - cron: '38 1 * * *' workflow_dispatch: push: - branches: [ "master" ] + # branches: [ "master" ] # Publish semver tags as releases. - # tags: [ 'v*.*.*' ] + tags: [ 'v*.*.*' ] # pull_request: - # branches: [ "master" ] + # branches: [ "master" ] env: # Use docker.io for Docker Hub if empty @@ -25,7 +27,6 @@ jobs: build: runs-on: ubuntu-latest - # if: startsWith(github.ref, 'refs/tags/v') permissions: contents: read packages: write diff --git a/CHANGELOG.md b/CHANGELOG.md index f9deb6a..557c356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [24.01/1.4.1] - 2024-01-05 +## [24.01.0] - 2024-01-05 +### +- retired semantic versions, new versions are based on vYEAR.MONTH.VERSION ## [23.09/1.4.1] - 2023-09-20 ### Changed diff --git a/Makefile b/Makefile index 9372ff1..9c6d3ed 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ RELEASE := 'v24.01.0' -RELEASESEM := 'v1.4.2' +# RELEASESEM := 'v1.4.2' all: build @@ -10,8 +10,8 @@ run: docker-compose up -d tag-version: - -git diff --exit-code && git diff --staged --exit-code && git tag -a $(RELEASE) -m 'Release $(RELEASE)' || (echo "Repo is dirty please commit first" && exit 1) - git diff --exit-code && git diff --staged --exit-code && git tag -a $(RELEASESEM) -m 'Release $(RELEASE)' || (echo "Repo is dirty please commit first" && exit 1) + #-git diff --exit-code && git diff --staged --exit-code && git tag -a $(RELEASE) -m 'Release $(RELEASE)' || (echo "Repo is dirty please commit first" && exit 1) + git diff --exit-code && git diff --staged --exit-code && git tag -a $(RELEASE) -m 'Release $(RELEASE)' || (echo "Repo is dirty please commit first" && exit 1) .PHONY: all build run tag-version \ No newline at end of file