Clean up OpenAPI metadata and documentation (#25) #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Bundle: | |
runs-on: ubuntu-latest | |
if: contains(github.event.head_commit.message, '#major') || contains(github.event.head_commit.message, '#minor') || contains(github.event.head_commit.message, '#patch') | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Prepare for bundling | |
run: | | |
mkdir -p kanae-docker | |
mkdir -p releases | |
cp docker/docker-compose.yml kanae-docker/ | |
cp docker/example.env kanae-docker/ | |
cp config-example.yml kanae-docker/ | |
- name: Bundle docker-related files | |
run: | | |
zip releases/kanae-docker.zip kanae-docker/** | |
tar -czf releases/kanae-docker.tar.gz kanae-docker/** | |
- name: Upload bundle | |
uses: actions/upload-artifact@v4 | |
with: | |
path: releases | |
Release: | |
runs-on: ubuntu-latest | |
needs: Bundle | |
if: contains(github.event.head_commit.message, '#major') || contains(github.event.head_commit.message, '#minor') || contains(github.event.head_commit.message, '#patch') | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Get Previous Tag | |
uses: WyriHaximus/github-action-get-previous-tag@v1 | |
id: prev_tag | |
with: | |
fallback: v0.1.0 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
path: releases | |
- name: Bump version and push tag | |
uses: anothrNick/[email protected] | |
id: tag_version | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
WITH_V: true | |
RELEASE_BRANCHES: main | |
- name: Release New Version | |
uses: ncipollo/release-action@v1 | |
with: | |
body: "https://github.com/UCMercedACM/kanae/compare/${{ steps.prev_tag.outputs.tag }}...${{ steps.tag_version.outputs.new_tag }}" | |
token: ${{ secrets.PAT_TOKEN }} | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: ${{ steps.tag_version.outputs.new_tag }} | |
artifacts: "releases/kanae-docker.zip,releases/kanae-docker.tar.gz" |