Skip to content

Commit

Permalink
Add workflow to publish release on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
khrj committed May 1, 2021
1 parent a907bbf commit e77d610
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Prerelease

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./daemon

steps:
- uses: actions/checkout@v2

- name: Cache
uses: Swatinem/[email protected]
with:
working-directory: ./daemon

- name: Build
run: cargo build --release

- name: Test
run: cargo test

- name: Lint
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path ./daemon/Cargo.toml

- name: Rename
run: mv target/release/repl_deploy target/release/repl.deploy

- name: Release
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
daemon/target/release/repl.deploy
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Release

on:
push:
pull_request:
tags:
- "*"

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -41,8 +42,6 @@ jobs:
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
prerelease: false
files: |
daemon/target/release/repl.deploy

1 comment on commit e77d610

@vercel
Copy link

@vercel vercel bot commented on e77d610 May 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.