cloudflare-ddns-service/.github/workflows/release.yml

37 lines
979 B
YAML

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
args: --release
- name: Get the version
run: echo ::set-env name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Archive
run: tar cfJ cloudflare-ddns-${VERSION}.tar.xz target/release/cloudflare-ddns
- name: Create release
uses: softprops/action-gh-release@v1
with:
body: |
cloudflare-ddns release ${VERSION}
files: |
cloudflare-ddns-${VERSION}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}