Skip to content

Commit 056b0c5

Browse files
committed
ci: Add Release step
Need to fetch tags manually: actions/checkout#290
1 parent 36a6f1a commit 056b0c5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ jobs:
7070
steps:
7171
- uses: actions/checkout@v2
7272

73+
# We need the tags for the version string inside bxt-rs
74+
- run: git fetch --force --tags
75+
7376
- name: Install dependencies
7477
if: matrix.os == 'ubuntu-20.04'
7578
run: |
@@ -103,6 +106,20 @@ jobs:
103106
path: target/${{ matrix.target }}/${{ matrix.configuration }}/${{ matrix.filename }}
104107
if-no-files-found: error
105108

109+
- name: Prepare Release
110+
if: startsWith(github.ref, 'refs/tags/') && matrix.rust == 'stable' && matrix.configuration == 'release' && matrix.features != 'profiling'
111+
run: |
112+
cp target/${{ matrix.target }}/${{ matrix.configuration }}/${{ matrix.filename }} ${{ matrix.filename }}
113+
7z a bxt-rs-${{ runner.os }}-${{ matrix.features }}.7z ${{ matrix.filename }} COPYING
114+
115+
- name: Release
116+
if: startsWith(github.ref, 'refs/tags/') && matrix.rust == 'stable' && matrix.configuration == 'release' && matrix.features != 'profiling'
117+
uses: softprops/action-gh-release@v1
118+
with:
119+
files: bxt-rs-${{ runner.os }}-${{ matrix.features }}.7z
120+
draft: true
121+
fail_on_unmatched_files: true
122+
106123
clippy:
107124
strategy:
108125
fail-fast: false

0 commit comments

Comments
 (0)