Skip to content

Commit f608208

Browse files
committed
Release - use matrix
softprops/action-gh-release#11
1 parent 7b2507d commit f608208

File tree

4 files changed

+19
-31
lines changed

4 files changed

+19
-31
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ env:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
1311
steps:
1412
- uses: actions/checkout@v3
1513
- name: Build

.github/workflows/release-win.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
name: release
1+
name: _release
22
on:
3-
push:
4-
tags: ['v*']
3+
workflow_call:
54

65
env:
76
CARGO_TERM_COLOR: always
87

98
jobs:
109
build:
11-
runs-on: ubuntu-latest
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, windows-latest]
1214
permissions:
1315
contents: write
1416
steps:
@@ -17,7 +19,9 @@ jobs:
1719
run: cargo build --verbose --release
1820
- name: Test
1921
run: cargo test --verbose --release
20-
- uses: ncipollo/release-action@v1
22+
- name: release
23+
uses: ncipollo/release-action@v1
24+
if: startsWith(github.ref, 'refs/tags/v')
2125
with:
22-
artifacts: "target/release/gitopolis"
26+
artifacts: "target/release/gitopolis*"
2327
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tag.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: tag
2+
3+
on:
4+
push:
5+
tags: [ "v*" ]
6+
7+
jobs:
8+
ci:
9+
uses: ./.github/workflows/release.yml

0 commit comments

Comments
 (0)