Skip to content

Commit

Permalink
add tested release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
No767 committed Aug 7, 2024
1 parent 6154f92 commit 5d8529c
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,36 @@ on:
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 rodhaj-docker
mkdir -p releases
cp docker/docker-compose.yml rodhaj-docker/
cp docker/example.env rodhaj-docker/
cp -r docker/pg/ rodhaj-docker/
- name: Bundle docker-related files
run: |
zip releases/rodhaj-docker.zip rodhaj-docker/**
tar -czf releases/rodhaj-docker.tar.gz rodhaj-docker/**
- name: Upload bundle
uses: actions/upload-artifact@v4
with:
path: releases


Release:
permissions:
contents: write
needs: 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')
Expand All @@ -15,6 +42,12 @@ jobs:
with:
fetch-depth: '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
Expand All @@ -30,4 +63,4 @@ jobs:
token: ${{ secrets.PAT_TOKEN }}
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
artifacts: "docker/docker-compose.yml,docker/example.env,config-example.yml"
artifacts: "releases/rodhaj-docker.zip,releases/rodhaj-docker.tar.gz"

0 comments on commit 5d8529c

Please sign in to comment.