2019-09-17 23:27:21 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*.*.*'
|
|
|
|
|
|
|
|
name: Create a GitHub release
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Install nightly toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
|
|
|
- name: Cargo build
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
command: build
|
|
|
|
arguments: --release
|
|
|
|
- name: Extract version
|
|
|
|
id: version
|
|
|
|
uses: actions/github-script@0.2.0
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
script: |
|
2019-09-17 23:48:58 +00:00
|
|
|
return context.payload.ref.split('/')[2];
|
2019-09-17 23:27:21 +00:00
|
|
|
- name: Archive
|
|
|
|
run: tar cfJ cloudflare-ddns-${{ steps.version.outputs.result }}.tar.xz target/cloudflare-ddns
|
|
|
|
- name: Create release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
2019-09-17 23:31:19 +00:00
|
|
|
body: |
|
|
|
|
cloudflare-ddns release ${{ steps.version.outputs.result }}
|
2019-09-17 23:27:21 +00:00
|
|
|
files: |
|
|
|
|
cloudflare-ddns-${{ steps.version.outputs.result }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|