Skip to content

Commit 424bf8b

Browse files
ci: update the way assets are uploaded
1 parent f2d1599 commit 424bf8b

File tree

4 files changed

+44
-24
lines changed

4 files changed

+44
-24
lines changed

.github/workflows/publish.yaml

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish
33
on:
44
push:
55
tags:
6-
- '*'
6+
- 'v*'
77

88
jobs:
99
publish_on_crates_io:
@@ -24,6 +24,14 @@ jobs:
2424
uses: actions-rs/cargo@v1
2525
with:
2626
command: publish
27+
- name: Create Release
28+
id: create_release
29+
uses: actions/create-release@v1
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
tag_name: ${{ github.ref }}
34+
release_name: Release ${{ github.ref }}
2735

2836
release_linux:
2937
needs: publish_on_crates_io
@@ -36,14 +44,16 @@ jobs:
3644
with:
3745
command: build
3846
args: --release
39-
- name: Release Linux binary
40-
uses: meeDamian/[email protected]
41-
if: startsWith(github.ref, 'refs/tags/')
47+
- name: Upload Release Asset Linux
48+
id: upload-release-asset-linux
49+
uses: actions/upload-release-asset@v1
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4252
with:
43-
gzip: false
44-
files: >
45-
gitweb-linux:target/release/gitweb
46-
token: ${{ secrets.GITHUB_TOKEN }}
53+
upload_url: ${{ steps.create_release.outputs.upload_url }}
54+
asset_path: ./target/release/gitweb
55+
asset_name: gitweb-linux
56+
asset_content_type: application/x-sharedlib
4757

4858
release_windows:
4959
needs: publish_on_crates_io
@@ -56,14 +66,16 @@ jobs:
5666
with:
5767
command: build
5868
args: --release
59-
- name: Release Windows binary
60-
uses: meeDamian/[email protected]
61-
if: startsWith(github.ref, 'refs/tags/')
69+
- name: Upload Release Asset Windows
70+
id: upload-release-asset-windows
71+
uses: actions/upload-release-asset@v1
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6274
with:
63-
gzip: false
64-
files: >
65-
gitweb-windows:target/release/gitweb.exe
66-
token: ${{ secrets.GITHUB_TOKEN }}
75+
upload_url: ${{ steps.create_release.outputs.upload_url }}
76+
asset_path: ./target/release/gitweb.exe
77+
asset_name: gitweb-windows.exe
78+
asset_content_type: application/x-dosexec
6779

6880
release_macos:
6981
needs: publish_on_crates_io
@@ -76,11 +88,13 @@ jobs:
7688
with:
7789
command: build
7890
args: --release
79-
- name: Release MacOS binary
80-
uses: meeDamian/[email protected]
81-
if: startsWith(github.ref, 'refs/tags/')
91+
- name: Upload Release Asset MacOS
92+
id: upload-release-asset-macos
93+
uses: actions/upload-release-asset@v1
94+
env:
95+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8296
with:
83-
gzip: false
84-
files: >
85-
gitweb-macos:target/release/gitweb
86-
token: ${{ secrets.GITHUB_TOKEN }}
97+
upload_url: ${{ steps.create_release.outputs.upload_url }}
98+
asset_path: ./target/release/gitweb
99+
asset_name: gitweb-macos
100+
asset_content_type: application/x-mach-binary

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ 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.4] - 2020-10-17
9+
10+
### Changed
11+
12+
- ci: update the way assets are uploaded
13+
814
## [0.2.3] - 2020-10-14
915

1016
### 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.3"
3+
version = "0.2.4"
44
authors = ["Yoann Fleury <[email protected]>"]
55
edition = "2018"
66
description = "Open the current remote repository in your browser"

0 commit comments

Comments
 (0)