Skip to content

Commit

Permalink
fix: rework ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Feb 5, 2024
1 parent 92417a2 commit c6c7ed4
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 63 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
Sync:
name: Check for config changes
config:
name: Config Sync
runs-on: ubuntu-latest
steps:
- name: Wait for other CI
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'Lint Check'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Checkout code
id: checkout-code
uses: actions/checkout@v3
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ jobs:
Docker:
runs-on: ubuntu-latest
steps:
- name: Wait for other CI
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'GitHub Release'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- uses: actions/checkout@v3

- name: Set .gitsha
if: github.event_name == 'push'
run: 'echo ${{github.sha}} > .gitsha'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push]

jobs:
lint:
name: Run Basic Checks
name: Lint Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/locales.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
Sync:
name: Generate missing locales with chatgpt
locales:
name: Locales Sync
runs-on: ubuntu-latest
steps:
- name: Wait for other CI
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'Config Sync'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Checkout code
id: checkout-code
uses: actions/checkout@v3
Expand Down Expand Up @@ -43,3 +50,6 @@ jobs:
git add --all
git commit --message "chore: sync locales"
git push
git checkout develop
git merge main
git push origin develop
37 changes: 0 additions & 37 deletions .github/workflows/main.yml

This file was deleted.

56 changes: 36 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
name: Release
on: [release]

on:
pull_request:
push:
branches:
- main
- develop

permissions: write-all

jobs:
sentry:
release:
name: GitHub Release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
id: checkout-code
uses: actions/checkout@v3
- name: Wait for other CI
uses: lewagon/[email protected]
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v3
ref: ${{ github.ref }}
check-name: 'Locales Sync'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Checkout
uses: actions/checkout@v3
with:
node-version: 18
cache: 'yarn'

- name: Install Dependencies
run: yarn

- name: Sentry Build
run: yarn release
fetch-depth: 0
- name: Install Volta
uses: volta-cli/action@v4
- name: Echo versions
run: |
node --version
yarn --version
- name: Install dependencies
run: yarn --prefer-offline
env:
HUSKY: 0
- name: Build app
run: yarn build
- name: Release
env:
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}}
SENTRY_DSN: ${{secrets.SENTRY_DSN}}
SENTRY_ORG: ${{secrets.SENTRY_ORG}}
SENTRY_PROJECT: ${{secrets.SENTRY_PROJECT}}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HUSKY: 0
run: npx semantic-release
35 changes: 35 additions & 0 deletions .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Sentry
on: [release]

jobs:
sentry:
runs-on: ubuntu-latest
steps:
- name: Wait for other CI
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'Lint Check'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Checkout Code
id: checkout-code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: Install Dependencies
run: yarn

- name: Sentry Build
run: yarn release
env:
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}}
SENTRY_DSN: ${{secrets.SENTRY_DSN}}
SENTRY_ORG: ${{secrets.SENTRY_ORG}}
SENTRY_PROJECT: ${{secrets.SENTRY_PROJECT}}

0 comments on commit c6c7ed4

Please sign in to comment.