Skip to content

Commit 5f9ea88

Browse files
authored
Add a proper release mechanism (#48)
* Add proper release mechanism * Update with correct CI badges * Use softprops/action-gh-release * Switch download method * Improve release layout * Better use drafts * Name the download step
1 parent b2ac40e commit 5f9ea88

File tree

4 files changed

+105
-9
lines changed

4 files changed

+105
-9
lines changed

.github/workflows/general.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: General
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
tags-ignore:
8+
- '**'
9+
pull_request:
10+
branches:
11+
- '**'
412

513
jobs:
614
lint:
@@ -107,4 +115,4 @@ jobs:
107115
working-directory: ./app
108116
- name: Build wrapper
109117
run: npm run build
110-
working-directory: ./wrapper
118+
working-directory: ./wrapper

.github/workflows/package.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Package
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
package:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
# Select platform(s)
18+
os: [ ubuntu-latest, macos-latest, windows-latest ]
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Use Node.js 14.x
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- name: Get npm cache directory
26+
id: npm-cache-dir
27+
run: |
28+
echo "::set-output name=dir::$(npm config get cache)"
29+
- uses: actions/cache@v2
30+
with:
31+
path: ${{ steps.npm-cache-dir.outputs.dir }}
32+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
33+
restore-keys: |
34+
${{ runner.os }}-build-${{ env.cache-name }}-
35+
${{ runner.os }}-build-
36+
${{ runner.os }}-
37+
- name: Run (root) npm install
38+
run: npm ci
39+
working-directory: ./
40+
- name: Run (app) npm install
41+
run: npm ci
42+
working-directory: ./app
43+
- name: Run (wrapper) npm install
44+
run: npm ci
45+
working-directory: ./wrapper
46+
- name: Release stack
47+
run: npm run release
48+
working-directory: ./
49+
- name: Upload artifact (Windows)
50+
uses: actions/upload-artifact@v2
51+
with:
52+
name: snowman-win.zip
53+
path: ./wrapper/build/*.zip
54+
if: matrix.os == 'windows-latest'
55+
- name: Upload artifact (MacOS)
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: snowman.dmg
59+
path: ./wrapper/build/*.dmg
60+
if: matrix.os == 'macos-latest'
61+
- name: Upload artifact (Linux)
62+
uses: actions/upload-artifact@v2
63+
with:
64+
name: snowman-lnx.zip
65+
path: ./wrapper/build/*.zip
66+
if: matrix.os == 'ubuntu-latest'

.github/workflows/release.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ name: Release
22

33
on:
44
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
5+
tags:
6+
- '**'
107

118
jobs:
12-
release:
9+
package:
1310
runs-on: ${{ matrix.os }}
1411
strategy:
1512
fail-fast: false
@@ -64,3 +61,28 @@ jobs:
6461
name: snowman-lnx.zip
6562
path: ./wrapper/build/*.zip
6663
if: matrix.os == 'ubuntu-latest'
64+
release:
65+
needs:
66+
- package
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v2
70+
- name: Create directory
71+
shell: bash
72+
run: |
73+
mkdir ./artifacts/
74+
- name: Download artifacts
75+
uses: actions/download-artifact@v2
76+
with:
77+
path: ./artifacts/
78+
- name: Create & Upload Release
79+
uses: softprops/action-gh-release@v1
80+
with:
81+
body: (to be manually added)
82+
draft: true
83+
files: |
84+
./artifacts/**/*
85+
./LICENSE
86+
./README.md
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44
<h1 align="center">Snowman</h1>
55

6-
#### [![General](https://github.com/HPI-Information-Systems/snowman/actions/workflows/general.yml/badge.svg)](https://github.com/HPI-Information-Systems/snowman/actions/workflows/general.yml) [![Documentation](https://github.com/HPI-Information-Systems/snowman/actions/workflows/docs.yml/badge.svg)](https://github.com/HPI-Information-Systems/snowman/actions/workflows/docs.yml) [![Release](https://github.com/HPI-Information-Systems/snowman/actions/workflows/release.yml/badge.svg)](https://github.com/HPI-Information-Systems/snowman/actions/workflows/release.yml)
6+
#### [![General](https://github.com/HPI-Information-Systems/snowman/actions/workflows/general.yml/badge.svg)](https://github.com/HPI-Information-Systems/snowman/actions/workflows/general.yml) [![Documentation](https://github.com/HPI-Information-Systems/snowman/actions/workflows/docs.yml/badge.svg)](https://github.com/HPI-Information-Systems/snowman/actions/workflows/docs.yml) [![Release](https://github.com/HPI-Information-Systems/snowman/actions/workflows/package.yml/badge.svg)](https://github.com/HPI-Information-Systems/snowman/actions/workflows/package.yml)
77

88
Comparing data matching algorithms is still an unsolved topic in both industry and research.
99
With snowman, developers and researchers will be able to compare the performance of different data matching solutions or improve new algorithms.

0 commit comments

Comments
 (0)