summaryrefslogtreecommitdiffstats
path: root/.github/workflows/create-release.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/create-release.yml')
-rw-r--r--.github/workflows/create-release.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
new file mode 100644
index 0000000..7a738c1
--- /dev/null
+++ b/.github/workflows/create-release.yml
@@ -0,0 +1,37 @@
+on:
+ push:
+ tags:
+ - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
+
+name: Upload Release Asset
+
+jobs:
+ build:
+ name: Upload Release Asset
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@master
+ - name: Build project
+ run: |
+ cargo build --release
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1.0.0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ github.ref }}
+ release_name: Release ${{ github.ref }}
+ draft: true
+ prerelease: true
+ - name: Upload Release Asset
+ 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/pokebot
+ asset_name: pokebot-ubuntu-latest
+ asset_content_type: application/octet-stream