-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1.13 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Add musl target
run: rustup target add x86_64-unknown-linux-musl
- name: Build
run: cargo build --release --target x86_64-unknown-linux-musl
- name: version
run: echo "::set-output name=version::$(./target/x86_64-unknown-linux-musl/release/iptables-proxy --version)"
id: version
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/x86_64-unknown-linux-musl/release/iptables-proxy
asset_name: iptables-proxy_linux-amd64
asset_content_type: application/octet-stream