mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix: workflow
* fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix --------- Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com>
This commit is contained in:
co-authored by
charlesgauthereau
parent
01b7a58c75
commit
94b36c1622
@@ -12,12 +12,11 @@ on:
|
||||
discord_footer:
|
||||
required: true
|
||||
type: string
|
||||
discord_webhook:
|
||||
secrets:
|
||||
DISCORD_WEBHOOK:
|
||||
required: true
|
||||
type: string
|
||||
gh_token:
|
||||
GH_TOKEN:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
notify-discord:
|
||||
@@ -25,8 +24,8 @@ jobs:
|
||||
steps:
|
||||
- name: Send Discord Notification
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ inputs.discord_webhook }}
|
||||
GH_TOKEN: ${{ inputs.gh_token }}
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: |
|
||||
RELEASE_INFO=$(gh release view "${{ github.ref_name }}" -R ${{ github.repository }} --json name,url,body,author)
|
||||
|
||||
|
||||
+109
-21
@@ -67,12 +67,96 @@
|
||||
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
#
|
||||
#
|
||||
#name: Auto Release & Publish
|
||||
#
|
||||
#on:
|
||||
# pull_request:
|
||||
# types: [ closed ]
|
||||
# branches:
|
||||
# - main
|
||||
#
|
||||
#permissions:
|
||||
# contents: write
|
||||
# packages: write
|
||||
#
|
||||
#jobs:
|
||||
# release:
|
||||
# if: github.event.pull_request.merged == true
|
||||
# runs-on: ubuntu-latest
|
||||
# outputs:
|
||||
# draft_tag: ${{ steps.release_step.outputs.draft_tag }}
|
||||
# steps:
|
||||
# - uses: actions/create-github-app-token@v1
|
||||
# id: app-token
|
||||
# with:
|
||||
# app-id: ${{ vars.APP_ID }}
|
||||
# private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
#
|
||||
# - uses: actions/checkout@v4
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
# token: ${{ steps.app-token.outputs.token }}
|
||||
# ref: main
|
||||
#
|
||||
# - uses: pnpm/action-setup@v4
|
||||
# - uses: actions/setup-node@v4
|
||||
# with:
|
||||
# node-version: "lts/*"
|
||||
# cache: "pnpm"
|
||||
#
|
||||
# - run: pnpm install --frozen-lockfile
|
||||
#
|
||||
# - run: |
|
||||
# git config --global user.name 'github-actions[bot]'
|
||||
# git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
#
|
||||
# - name: Run release-it
|
||||
# id: release_step
|
||||
# run: |
|
||||
# git pull origin main
|
||||
# OUTPUT=$(pnpm exec release-it --ci)
|
||||
# echo "$OUTPUT"
|
||||
# # Extract the untagged draft release name
|
||||
# DRAFT_TAG=$(echo "$OUTPUT" | grep -o 'releases/tag/[^ ]*' | sed 's|releases/tag/||')
|
||||
# echo "draft_tag=$DRAFT_TAG" >> $GITHUB_OUTPUT
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# # - name: Build & publish Docker
|
||||
# # uses: ./.github/workflows/docker.yml
|
||||
# # with:
|
||||
# # add_latest: true
|
||||
# # secrets:
|
||||
# # DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_2 }}
|
||||
# # DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_2 }}
|
||||
#
|
||||
# - name: Publish GitHub Release
|
||||
# env:
|
||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# run: |
|
||||
# gh release edit ${{ steps.release_step.outputs.draft_tag }} --draft=false
|
||||
#
|
||||
#
|
||||
# - name: Notify Discord
|
||||
# uses: ./.github/workflows/discord.yml
|
||||
# with:
|
||||
# discord_title: "New Release: v${{ steps.bump.outputs.version }}"
|
||||
# discord_color: 3066993
|
||||
# discord_footer: "Portabase"
|
||||
# secrets:
|
||||
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
name: Auto Release & Publish
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [ closed ]
|
||||
types: [closed]
|
||||
branches:
|
||||
- main
|
||||
|
||||
@@ -81,7 +165,7 @@ permissions:
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
create-release:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
@@ -117,35 +201,39 @@ jobs:
|
||||
git pull origin main
|
||||
OUTPUT=$(pnpm exec release-it --ci)
|
||||
echo "$OUTPUT"
|
||||
# Extract the untagged draft release name
|
||||
DRAFT_TAG=$(echo "$OUTPUT" | grep -o 'releases/tag/[^ ]*' | sed 's|releases/tag/||')
|
||||
echo "draft_tag=$DRAFT_TAG" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
|
||||
# publish-docker:
|
||||
# uses: ./.github/workflows/docker.yml
|
||||
# with:
|
||||
# add_latest: true
|
||||
# secrets:
|
||||
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_2 }}
|
||||
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_2 }}
|
||||
|
||||
|
||||
# - name: Build & publish Docker
|
||||
# uses: ./.github/workflows/docker.yml
|
||||
# with:
|
||||
# add_latest: true
|
||||
# secrets:
|
||||
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_2 }}
|
||||
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_2 }}
|
||||
|
||||
finalize-release:
|
||||
needs: create-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Publish GitHub Release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release edit ${{ steps.release_step.outputs.draft_tag }} --draft=false
|
||||
gh release edit ${{ needs.create-release.outputs.draft_tag }} --draft=false
|
||||
|
||||
|
||||
- name: Notify Discord
|
||||
uses: ./.github/workflows/discord.yml
|
||||
with:
|
||||
discord_title: "New Release: v${{ steps.bump.outputs.version }}"
|
||||
discord_color: 3066993
|
||||
discord_footer: "Portabase"
|
||||
discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
gh_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
notify-discord:
|
||||
needs: create-release
|
||||
uses: ./.github/workflows/discord.yml
|
||||
with:
|
||||
discord_title: "New Release: v${{ needs.create-release.outputs.draft_tag }}"
|
||||
discord_color: 3066993
|
||||
discord_footer: "Portabase"
|
||||
secrets:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user