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
|
2019-09-18 00:18:12 +00:00
|
|
|
- name: Get the version
|
|
|
|
run: echo ::set-env name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
|
2019-09-17 23:27:21 +00:00
|
|
|
- name: Archive
|
2019-09-18 00:18:12 +00:00
|
|
|
run: tar cfJ cloudflare-ddns-${{ VERSION }}.tar.xz target/release/cloudflare-ddns
|
2019-09-17 23:27:21 +00:00
|
|
|
- name: Create release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
2019-09-17 23:31:19 +00:00
|
|
|
body: |
|
2019-09-18 00:18:12 +00:00
|
|
|
cloudflare-ddns release ${{ VERSION }}
|
2019-09-17 23:27:21 +00:00
|
|
|
files: |
|
2019-09-18 00:18:12 +00:00
|
|
|
cloudflare-ddns-${{ VERSION }}
|
2019-09-17 23:27:21 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|