mirror of
https://github.com/unraid/api.git
synced 2026-01-06 16:49:49 -06:00
chore: add release job
This commit is contained in:
56
.github/workflows/main.yml
vendored
56
.github/workflows/main.yml
vendored
@@ -196,6 +196,61 @@ jobs:
|
||||
asset_name: unraid-api.tgz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Create Sentry release
|
||||
uses: getsentry/action-release@v1
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
with:
|
||||
environment: prerelease
|
||||
|
||||
release:
|
||||
# Only release if this is a version tag
|
||||
if: |
|
||||
startsWith(github.ref, 'refs/tags/v') &&
|
||||
(!contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc'))
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: [build-binary]
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Add SSH deploy key
|
||||
uses: shimataro/ssh-key-action@v2
|
||||
with:
|
||||
key: ${{ secrets.UNRAID_BOT_SSH_KEY }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
|
||||
- name: Download unraid-api binary tgz
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: unraid-api
|
||||
|
||||
- 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: ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload release assets
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./unraid-api.tgz
|
||||
asset_name: unraid-api.tgz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Create Sentry release
|
||||
uses: getsentry/action-release@v1
|
||||
env:
|
||||
@@ -204,3 +259,4 @@ jobs:
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
with:
|
||||
environment: production
|
||||
version: ${{ github.ref }}
|
||||
|
||||
Reference in New Issue
Block a user