diff options
| author | Jokler <jokler@protonmail.com> | 2020-02-06 05:59:23 +0100 |
|---|---|---|
| committer | Jokler <jokler@protonmail.com> | 2020-02-11 14:46:12 +0100 |
| commit | 6395ad4fdb04e5598842330a48368eddd1d92de7 (patch) | |
| tree | 791230212273f1c05d30348b46b697b9ccea4a93 | |
| parent | 96ea75ebce848e5c5354956315fb4ba9fd6bffed (diff) | |
| download | pokebot-6395ad4fdb04e5598842330a48368eddd1d92de7.tar.gz pokebot-6395ad4fdb04e5598842330a48368eddd1d92de7.zip | |
Add automatic release workflow
| -rw-r--r-- | .github/workflows/create-release.yml | 37 | ||||
| -rw-r--r-- | .github/workflows/run-tests.yml (renamed from .github/workflows/rust.yml) | 0 |
2 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 diff --git a/.github/workflows/rust.yml b/.github/workflows/run-tests.yml index 63638a9..63638a9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/run-tests.yml |
