Skip to content

Commit 1882dbe

Browse files
committed
Define release workflow
1 parent b481bd7 commit 1882dbe

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# based on example from https://github.com/actions/upload-release-asset
2+
3+
name: Upload release
4+
5+
on:
6+
push:
7+
# Sequence of patterns matched against refs/tags
8+
tags:
9+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
10+
11+
jobs:
12+
build:
13+
name: Upload Release Asset
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Install latest nightly
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: nightly
21+
override: true
22+
components: rustfmt
23+
- name: Build
24+
run: cargo build --verbose --release
25+
- name: Create Release
26+
id: create_release
27+
uses: actions/create-release@v1
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
with:
31+
tag_name: ${{ github.ref }}
32+
release_name: Release ${{ github.ref }}
33+
draft: true
34+
prerelease: false
35+
- name: Upload Release Asset
36+
id: upload-release-asset
37+
uses: actions/upload-release-asset@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
42+
asset_path: target/release/vimbrute
43+
asset_name: vimbrute
44+
asset_content_type: application/x-elf

.github/workflows/rust.yml renamed to .github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Rust
1+
name: Build and test
22

33
on:
44
- push

0 commit comments

Comments
 (0)