Skip to content

Commit 2ffe7aa

Browse files
committed
More workflow
1 parent 98c6dde commit 2ffe7aa

File tree

3 files changed

+43
-61
lines changed

3 files changed

+43
-61
lines changed
Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
1-
name: Binaries
1+
name: Test
22

33
on:
44
push:
55
branches: ["main"]
6+
tags:
7+
- v*
68
pull_request:
79
branches: ["main"]
810

11+
env:
12+
CARGO_TERM_COLOR: always
13+
914
jobs:
10-
release:
15+
test:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Build
20+
run: cargo build
21+
- name: Run tests
22+
run: cargo test
23+
build:
1124
name: Release ${{ matrix.platform.project }} - ${{ matrix.platform.release_for }}
1225
if: github.event.pull_request.draft == false
1326
strategy:
@@ -75,3 +88,31 @@ jobs:
7588
with:
7689
name: ${{ matrix.platform.bin }}-${{ matrix.platform.target }}
7790
path: ${{ matrix.platform.name }}
91+
release:
92+
name: Release
93+
needs:
94+
- build
95+
- test
96+
if: startsWith(github.ref, 'refs/tags/v')
97+
runs-on: ubuntu-latest
98+
steps:
99+
- name: Checkout
100+
uses: actions/checkout@v4
101+
- name: Download artifacts
102+
uses: actions/download-artifact@v4
103+
with:
104+
name: artifacts
105+
path: artifacts
106+
pattern: codebook-lsp-*
107+
- name: Make release
108+
uses: softprops/action-gh-release@v2
109+
with:
110+
files: |
111+
artifacts/codebook-lsp*
112+
prerelease: true
113+
fail_on_unmatched_files: true
114+
generate_release_notes: true
115+
draft: false
116+
tag_name: ${{ github.ref_name }}
117+
env:
118+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

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

.github/workflows/test.yml

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

0 commit comments

Comments
 (0)