Merge branch 'release/0.1.7'

This commit is contained in:
Rostislav Raykov 2019-09-19 11:44:05 +02:00
commit 5df01f1aea
4 changed files with 66 additions and 44 deletions

View file

@ -1,13 +1,71 @@
on:
push:
branches:
- master
tags:
- '*.*.*'
name: Publish to crates.io
name: Publish
jobs:
build_and_test:
name: Publish cloudflare-ddns
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-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
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Archive binary
run: tar cfJ cloudflare-ddns-${{ matrix.os }}-${{ steps.get_version.outputs.VERSION }}.tar.xz target/release/cloudflare-ddns
- name: Save archived binary as an artifact
uses: actions/upload-artifact@v1
with:
name: binary-${{ matrix.os }}-${{ steps.get_version.outputs.VERSION }}
path: cloudflare-ddns-${{ matrix.os }}-${{ steps.get_version.outputs.VERSION }}.tar.xz
create_github_release:
name: Prepare a GitHub release
runs-on: ubuntu-latest
needs: build
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Download macOS binary archive
uses: actions/download-artifact@v1
with:
name: binary-macOS-latest-${{ steps.get_version.outputs.VERSION }}
path: cloudflare-ddns-macOS-${{ steps.get_version.outputs.VERSION }}.tar.xz
- name: Download Linux binary archive
uses: actions/download-artifact@v1
with:
name: binary-ubuntu-latest-${{ steps.get_version.outputs.VERSION }}
path: cloudflare-ddns-ubuntu-${{ steps.get_version.outputs.VERSION }}.tar.xz
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: cloudflare-ddns v${{ steps.get_version.outputs.VERSION }}
files: |
LICENSE
cloudflare-ddns-macOS-${{ steps.get_version.outputs.VERSION }}
cloudflare-ddns-ubuntu-${{ steps.get_version.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_crate:
name: Publish cloudflare-ddns to crates.io
runs-on: ubuntu-latest
steps:
- name: Checkout latest master

View file

@ -1,37 +0,0 @@
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 }}

2
Cargo.lock generated
View file

@ -153,7 +153,7 @@ dependencies = [
[[package]]
name = "cloudflare-ddns"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"exitcode 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -1,6 +1,6 @@
[package]
name = "cloudflare-ddns"
version = "0.1.6"
version = "0.1.7"
authors = ["Rostislav Raykov <z@zbrox.org>"]
edition = "2018"
description = "A simple CLI tool to use Cloudflare's free DDNS service"
@ -10,6 +10,7 @@ keywords = ["cloudflare", "ddns", "cli"]
categories = ["command-line-utilities"]
license = "MIT"
documentation = "https://github.com/zbrox/cloudflare-ddns"
readme = "README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html