ci: Build on every push #761
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build all services | |
on: | |
push | |
# cancel all running builds when pushing | |
concurrency: | |
group: brawltime | |
cancel-in-progress: true | |
jobs: | |
build-cube: | |
uses: schneefux/brawltimeninja/.github/workflows/build-service.yml@master | |
with: | |
service: cube | |
build-media: | |
uses: schneefux/brawltimeninja/.github/workflows/build-service.yml@master | |
with: | |
service: media | |
build-render: | |
uses: schneefux/brawltimeninja/.github/workflows/build-service.yml@master | |
with: | |
service: render | |
build-manager: | |
uses: schneefux/brawltimeninja/.github/workflows/build-service.yml@master | |
with: | |
service: manager | |
build-web: | |
uses: schneefux/brawltimeninja/.github/workflows/build-service.yml@master | |
with: | |
service: web | |
needs: build-klicker | |
secrets: | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
build-klicker: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./klicker | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
cache: yarn | |
cache-dependency-path: klicker/yarn.lock | |
registry-url: 'https://npm.pkg.github.com' | |
- run: yarn install --frozen-lockfile | |
- | |
name: Update klicker version | |
run: | | |
sed -i -E 's/"version": "(.*)"/"version": "\1-${{ github.sha }}"/g' ./package.json | |
- | |
name: Publish package to GitHub package registry | |
continue-on-error: true | |
run: yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Publish to Chromatic | |
continue-on-error: true | |
uses: chromaui/action@v1 | |
with: | |
workingDir: ./klicker | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
exitOnceUploaded: true |