Skip to content

Commit 5d8529c

Browse files
committed
add tested release workflow
1 parent 6154f92 commit 5d8529c

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

.github/workflows/release.yml

+34-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,36 @@ on:
44
branches:
55
- main
66
jobs:
7+
Bundle:
8+
runs-on: ubuntu-latest
9+
if: contains(github.event.head_commit.message, '#major') || contains(github.event.head_commit.message, '#minor') || contains(github.event.head_commit.message, '#patch')
10+
steps:
11+
- name: Checkout Repository
12+
uses: actions/checkout@v4
13+
14+
- name: Prepare for bundling
15+
run: |
16+
mkdir -p rodhaj-docker
17+
mkdir -p releases
18+
cp docker/docker-compose.yml rodhaj-docker/
19+
cp docker/example.env rodhaj-docker/
20+
cp -r docker/pg/ rodhaj-docker/
21+
22+
- name: Bundle docker-related files
23+
run: |
24+
zip releases/rodhaj-docker.zip rodhaj-docker/**
25+
tar -czf releases/rodhaj-docker.tar.gz rodhaj-docker/**
26+
27+
- name: Upload bundle
28+
uses: actions/upload-artifact@v4
29+
with:
30+
path: releases
31+
32+
733
Release:
834
permissions:
935
contents: write
36+
needs: Bundle
1037

1138
runs-on: ubuntu-latest
1239
if: contains(github.event.head_commit.message, '#major') || contains(github.event.head_commit.message, '#minor') || contains(github.event.head_commit.message, '#patch')
@@ -15,6 +42,12 @@ jobs:
1542
with:
1643
fetch-depth: '0'
1744

45+
- name: Download Artifacts
46+
uses: actions/download-artifact@v4
47+
with:
48+
name: artifact
49+
path: releases
50+
1851
- name: Bump version and push tag
1952
uses: anothrNick/[email protected]
2053
id: tag_version
@@ -30,4 +63,4 @@ jobs:
3063
token: ${{ secrets.PAT_TOKEN }}
3164
tag: ${{ steps.tag_version.outputs.new_tag }}
3265
name: ${{ steps.tag_version.outputs.new_tag }}
33-
artifacts: "docker/docker-compose.yml,docker/example.env,config-example.yml"
66+
artifacts: "releases/rodhaj-docker.zip,releases/rodhaj-docker.tar.gz"

0 commit comments

Comments
 (0)