Skip to content

Commit fec2cd9

Browse files
ci: improve ci/cd with windows and macos binaries
1 parent 6e2ef56 commit fec2cd9

6 files changed

Lines changed: 87 additions & 51 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,11 @@ on:
66
- '*'
77

88
jobs:
9-
release_linux:
10-
name: Linux Release
9+
publish_on_crates_io:
10+
name: Publish on crates.io
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
14-
- name: Linux Build
15-
uses: actions-rs/cargo@v1
16-
with:
17-
command: build
18-
args: --release
19-
- name: Linux Package
20-
uses: actions-rs/cargo@v1
21-
with:
22-
command: package
2314
- name: Login to crates.io
2415
uses: actions-rs/cargo@v1
2516
with:
@@ -33,11 +24,63 @@ jobs:
3324
uses: actions-rs/cargo@v1
3425
with:
3526
command: publish
27+
28+
release_linux:
29+
needs: publish_on_crates_io
30+
name: Linux Release
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Linux Build
35+
uses: actions-rs/cargo@v1
36+
with:
37+
command: build
38+
args: --release
3639
- name: Release Linux binary
37-
uses: meeDamian/github-release@1.0
40+
uses: meeDamian/github-release@2.0
41+
if: startsWith(github.ref, 'refs/tags/')
42+
with:
43+
gzip: false
44+
files: >
45+
gitweb-${{ github.ref }}-linux:target/release/gitweb
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
48+
release_windows:
49+
needs: publish_on_crates_io
50+
name: Windows Release
51+
runs-on: windows-latest
52+
steps:
53+
- uses: actions/checkout@v2
54+
- name: Windows Build
55+
uses: actions-rs/cargo@v1
56+
with:
57+
command: build
58+
args: --release
59+
- name: Release Windows binary
60+
uses: meeDamian/github-release@2.0
61+
if: startsWith(github.ref, 'refs/tags/')
62+
with:
63+
gzip: false
64+
files: >
65+
gitweb-${{ github.ref }}-windows:target/release/gitweb.exe
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
68+
release_macos:
69+
needs: publish_on_crates_io
70+
name: MacOS Release
71+
runs-on: macos-latest
72+
steps:
73+
- uses: actions/checkout@v2
74+
- name: MacOS Build
75+
uses: actions-rs/cargo@v1
76+
with:
77+
command: build
78+
args: --release
79+
- name: Release MacOS binary
80+
uses: meeDamian/github-release@2.0
3881
if: startsWith(github.ref, 'refs/tags/')
3982
with:
4083
gzip: false
4184
files: >
42-
gitweb:target/release/gitweb
85+
gitweb-${{ github.ref }}-macos:target/release/gitweb
4386
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Tests
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
tests:
7+
name: Tests
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, windows-latest]
11+
12+
runs-on: ${{ matrix.os }}
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Run tests
17+
run: cargo test --verbose
18+
- uses: actions-rs/clippy-check@v1
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
args: --all-features

.github/workflows/rust.yaml

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

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.2] - 2020-10-14
9+
10+
### Changed
11+
12+
- build(deps): bump regex from 1.4.0 to 1.4.1
13+
- build(deps): bump git2 from 0.13.11 to 0.13.12
14+
- improve CI/CD with windows and macos binaries
15+
816
## [0.2.1] - 2020-10-12
917

1018
### Changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gitweb"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["Yoann Fleury <yoann.fleury@yahoo.com>"]
55
edition = "2018"
66
description = "Open the current remote repository in your browser"

0 commit comments

Comments
 (0)