summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Geary <rtgnj42@gmail.com>2020-08-16 09:36:40 -0400
committerRyan Geary <rtgnj42@gmail.com>2020-08-16 09:36:40 -0400
commitabde65491b6459e5cede2ad91702176c839a5f53 (patch)
tree217f1e3c6260c998f155feee816134c71ae6ccf5
parent064efa3fcb5f1b39981f3726e5041cc06873d832 (diff)
Add GitHub action to create GitHub release
-rw-r--r--.github/workflows/crates.yml22
-rw-r--r--.github/workflows/release.yml49
2 files changed, 49 insertions, 22 deletions
diff --git a/.github/workflows/crates.yml b/.github/workflows/crates.yml
deleted file mode 100644
index d4cd86e..0000000
--- a/.github/workflows/crates.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Crates.io Release
-
-on:
- push:
- tags:
- - v*
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- - name: Check style
- run: cargo fmt -- --check
- - name: Build
- run: cargo build --verbose
- - name: Run tests
- run: cargo test --verbose
- - name: Publish
- run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..824e2c3
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,49 @@
+name: Create Releases
+
+on:
+ push:
+ tags:
+ - v*
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Check style
+ run: cargo fmt -- --check
+
+ - name: Build
+ run: cargo build --verbose --release
+
+ - name: Run tests
+ run: cargo test --verbose
+
+ - name: Create GitHub release
+ id: create-release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ github.ref }}
+ release_name: Release ${{ github.ref }}
+ body: ''
+ draft: false
+ prerelease: false
+
+ - name: Upload binary to GitHub release
+ id: upload-release-asset
+ uses: actions/upload-release-asset@v1.0.1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create-release.outputs.upload_url }}
+ asset_path: target/release/choose
+ asset_name: choose
+ asset_content_type: application/raw
+
+ - name: Create crates.io release
+ run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}