Skip to content

Commit

Permalink
chore(ci): auto upload file to github release
Browse files Browse the repository at this point in the history
  • Loading branch information
Eliot00 committed Apr 29, 2021
1 parent 5eb5f90 commit b12685e
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
File renamed without changes.
79 changes: 79 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Upload

on:
push:
tags:
- '*'

jobs:
build_ubuntu:
name: Build Ubuntu
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Build
run: cargo build release

- name: Upload to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/commit-formatter
asset_name: commit-formatter-linux
tag: ${{ github.ref }}

build_windows:
name: Build Windows
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Build
run: cargo build release

- name: Upload to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/commit-formatter.exe
asset_name: commit-formatter-windows.exe
tag: ${{ github.ref }}

build_macOS:
name: Build macOS
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Build
run: cargo build release

- name: Upload to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/commit-formatter
asset_name: commit-formatter-mac
tag: ${{ github.ref }}

0 comments on commit b12685e

Please sign in to comment.