Skip to content

Commit

Permalink
ci: update the way assets are uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannfleurydev committed Oct 17, 2020
1 parent f2d1599 commit 424bf8b
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 24 deletions.
58 changes: 36 additions & 22 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish
on:
push:
tags:
- '*'
- 'v*'

jobs:
publish_on_crates_io:
Expand All @@ -24,6 +24,14 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: publish
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}

release_linux:
needs: publish_on_crates_io
Expand All @@ -36,14 +44,16 @@ jobs:
with:
command: build
args: --release
- name: Release Linux binary
uses: meeDamian/[email protected]
if: startsWith(github.ref, 'refs/tags/')
- name: Upload Release Asset Linux
id: upload-release-asset-linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
gzip: false
files: >
gitweb-linux:target/release/gitweb
token: ${{ secrets.GITHUB_TOKEN }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/gitweb
asset_name: gitweb-linux
asset_content_type: application/x-sharedlib

release_windows:
needs: publish_on_crates_io
Expand All @@ -56,14 +66,16 @@ jobs:
with:
command: build
args: --release
- name: Release Windows binary
uses: meeDamian/[email protected]
if: startsWith(github.ref, 'refs/tags/')
- name: Upload Release Asset Windows
id: upload-release-asset-windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
gzip: false
files: >
gitweb-windows:target/release/gitweb.exe
token: ${{ secrets.GITHUB_TOKEN }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/gitweb.exe
asset_name: gitweb-windows.exe
asset_content_type: application/x-dosexec

release_macos:
needs: publish_on_crates_io
Expand All @@ -76,11 +88,13 @@ jobs:
with:
command: build
args: --release
- name: Release MacOS binary
uses: meeDamian/[email protected]
if: startsWith(github.ref, 'refs/tags/')
- name: Upload Release Asset MacOS
id: upload-release-asset-macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
gzip: false
files: >
gitweb-macos:target/release/gitweb
token: ${{ secrets.GITHUB_TOKEN }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/gitweb
asset_name: gitweb-macos
asset_content_type: application/x-mach-binary
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.4] - 2020-10-17

### Changed

- ci: update the way assets are uploaded

## [0.2.3] - 2020-10-14

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gitweb"
version = "0.2.3"
version = "0.2.4"
authors = ["Yoann Fleury <[email protected]>"]
edition = "2018"
description = "Open the current remote repository in your browser"
Expand Down

0 comments on commit 424bf8b

Please sign in to comment.