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 --------- Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com>
This commit is contained in:
co-authored by
charlesgauthereau
parent
f85d12448c
commit
d0091cfed3
@@ -1,46 +0,0 @@
|
||||
name: Auto Release bot
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [ closed ]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
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: ${{ github.base_ref }}
|
||||
|
||||
- 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]'
|
||||
- run: git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
|
||||
- name: Increment version and push
|
||||
id: release_step
|
||||
run: |
|
||||
git pull origin main
|
||||
pnpm exec release-it --ci --no-github
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
@@ -1,47 +0,0 @@
|
||||
name: PR Checker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
validate-code:
|
||||
name: Code Integrity Check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Check code formatting
|
||||
run: pnpm run format:check
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run Linter
|
||||
run: pnpm run lint
|
||||
continue-on-error: true
|
||||
|
||||
- name: Type Check
|
||||
run: pnpm run typecheck
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run Tests
|
||||
run: pnpm run test
|
||||
continue-on-error: true
|
||||
|
||||
- name: Test Application Build
|
||||
run: pnpm run build
|
||||
+106
-34
@@ -1,17 +1,17 @@
|
||||
name: Publish Docker Image & Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*.*.*"
|
||||
- "!*-*"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
|
||||
#name: Publish Docker Image & Release
|
||||
#
|
||||
#on:
|
||||
# push:
|
||||
# tags:
|
||||
# - "*.*.*"
|
||||
# - "!*-*"
|
||||
#
|
||||
#permissions:
|
||||
# contents: read
|
||||
# packages: write
|
||||
#
|
||||
#jobs:
|
||||
#
|
||||
# docker_publish:
|
||||
# uses: ./.github/workflows/docker.yml
|
||||
# with:
|
||||
@@ -19,12 +19,71 @@ jobs:
|
||||
# secrets:
|
||||
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_2 }}
|
||||
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_2 }}
|
||||
|
||||
publish_release:
|
||||
#
|
||||
# publish_release:
|
||||
# needs: docker_publish
|
||||
# runs-on: ubuntu-latest
|
||||
# permissions:
|
||||
# contents: write
|
||||
# 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]'
|
||||
# - run: git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
#
|
||||
# - name: Publish GitHub Release with release-it
|
||||
# run: |
|
||||
# pnpm exec release-it ${{ github.ref_name }} --ci --no-version --no-npm
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
#
|
||||
# discord_notification:
|
||||
# needs: docker_publish
|
||||
# uses: ./.github/workflows/discord.yml
|
||||
# with:
|
||||
# discord_title: "New Release: v${{ github.ref_name }}"
|
||||
# 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]
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
@@ -36,11 +95,9 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
#ref: ${{ github.base_ref }}
|
||||
ref: main
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
@@ -48,22 +105,37 @@ jobs:
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
- run: git config --global user.name 'github-actions[bot]'
|
||||
- run: git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
- run: |
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
|
||||
- name: Publish GitHub Release with release-it
|
||||
- name: Bump version & push tag
|
||||
id: bump
|
||||
run: |
|
||||
pnpm exec release-it ${{ github.ref_name }} --ci --no-version --no-npm
|
||||
pnpm exec release-it --ci --no-npm
|
||||
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
|
||||
run: |
|
||||
pnpm exec release-it ${{ steps.bump.outputs.version }} --ci --no-npm --no-git
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# discord_notification:
|
||||
# needs: docker_publish
|
||||
# uses: ./.github/workflows/discord.yml
|
||||
# with:
|
||||
# discord_title: "New Release: v${{ github.ref_name }}"
|
||||
# discord_color: 3066993
|
||||
# discord_footer: "Portabase"
|
||||
# secrets:
|
||||
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- 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 }}
|
||||
|
||||
+2
-3
@@ -1,9 +1,8 @@
|
||||
{
|
||||
"github": {
|
||||
"release": true,
|
||||
"draft": true,
|
||||
"tokenRef": "GITHUB_TOKEN",
|
||||
"update": true
|
||||
"draft": false,
|
||||
"tokenRef": "GITHUB_TOKEN"
|
||||
},
|
||||
"git": {
|
||||
"commit": true,
|
||||
|
||||
Reference in New Issue
Block a user