forked from jmug/stoatchat
ci: send release notification on create (#481)
This commit is contained in:
1
.github/workflows/docker.yaml
vendored
1
.github/workflows/docker.yaml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "Dockerfile"
|
- "Dockerfile"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|||||||
16
.github/workflows/release-please.yml
vendored
16
.github/workflows/release-please.yml
vendored
@@ -20,6 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
release_created: ${{ steps.rp.outputs.release_created }}
|
release_created: ${{ steps.rp.outputs.release_created }}
|
||||||
|
tag_name: ${{ steps.rp.outputs.tag_name }}
|
||||||
steps:
|
steps:
|
||||||
- id: app-token
|
- id: app-token
|
||||||
uses: actions/create-github-app-token@v2
|
uses: actions/create-github-app-token@v2
|
||||||
@@ -32,8 +33,8 @@ jobs:
|
|||||||
token: ${{ steps.app-token.outputs.token }}
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
config-file: release-please-config.json
|
config-file: release-please-config.json
|
||||||
|
|
||||||
publish-stable:
|
publish-please:
|
||||||
name: Publish release to stable branch
|
name: Publish Please
|
||||||
needs: release-please
|
needs: release-please
|
||||||
if: needs.release-please.outputs.release_created == 'true'
|
if: needs.release-please.outputs.release_created == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -44,6 +45,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
app-id: ${{ secrets.GH_STOAT_RELEASE_APP_ID }}
|
app-id: ${{ secrets.GH_STOAT_RELEASE_APP_ID }}
|
||||||
private-key: ${{ secrets.GH_STOAT_RELEASE_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.GH_STOAT_RELEASE_APP_PRIVATE_KEY }}
|
||||||
- uses: katyo/publish-crates@v2
|
|
||||||
|
- name: Send release notification webhook
|
||||||
|
run: |
|
||||||
|
RELEASE_URL="https://github.com/revoltchat/backend/releases/tag/${{ needs.release-please.outputs.tag_name }}"
|
||||||
|
curl -X POST "${{ secrets.STOAT_WEBHOOK_UPDATES_URL }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"content\": \"$RELEASE_URL\"}"
|
||||||
|
|
||||||
|
- name: Publish crates
|
||||||
|
uses: katyo/publish-crates@v2
|
||||||
with:
|
with:
|
||||||
registry-token: ${{ secrets.CRATES_IO_PUBLISH_TOKEN }}
|
registry-token: ${{ secrets.CRATES_IO_PUBLISH_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user