Skip to content

Commit 7ca7da3

Browse files
authored
Merge pull request #210 from weaviate/add-auto-release-step
Add separate Create Release github action
2 parents a7bd71c + 996830b commit 7ca7da3

File tree

2 files changed

+51
-24
lines changed

2 files changed

+51
-24
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Create Release
2+
on:
3+
push:
4+
# run only on tags
5+
tags:
6+
- '**'
7+
8+
jobs:
9+
release:
10+
name: Deploy
11+
if: startsWith(github.ref, 'refs/tags')
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Unpack secrets
16+
env:
17+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
18+
run: |
19+
./decrypt_secret.sh
20+
- name: Deploy
21+
env:
22+
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
23+
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
24+
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
25+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
26+
run: |
27+
mvn -DskipTests clean package
28+
mvn -s settings.xml deploy
29+
- name: Archive artifacts
30+
uses: actions/upload-artifact@v3
31+
with:
32+
path: "target/*.jar"
33+
gh-release:
34+
name: Create a GitHub Release
35+
if: startsWith(github.ref, 'refs/tags')
36+
runs-on: ubuntu-latest
37+
needs: [ release ]
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v3
41+
- name: Download artifacts to append to release
42+
uses: actions/download-artifact@v3
43+
with:
44+
path: "target/*.jar"
45+
- name: Release
46+
uses: softprops/action-gh-release@v1
47+
with:
48+
generate_release_notes: true
49+
draft: true
50+
files: target/*.jar

.github/workflows/test.yaml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1+
name: Tests
12
on:
23
push:
34
branches:
45
- main
5-
tags:
6-
- '**'
76
pull_request:
87

9-
108
jobs:
119
tests:
1210
name: Tests
@@ -31,24 +29,3 @@ jobs:
3129
run: |
3230
docker-compose -f src/test/resources/docker-compose-test.yaml pull
3331
mvn clean test
34-
deploy:
35-
needs: tests
36-
name: Deploy
37-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@v3
41-
- name: Unpack secrets
42-
env:
43-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
44-
run: |
45-
./decrypt_secret.sh
46-
- name: Deploy
47-
env:
48-
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
49-
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
50-
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
51-
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
52-
run: |
53-
mvn -DskipTests clean package
54-
mvn -s settings.xml deploy

0 commit comments

Comments
 (0)