Skip to content

Commit

Permalink
chore: Add publishing workflow for main
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisingenhaag committed Mar 23, 2024
1 parent 296f22b commit 8de30f9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/npm-build-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ jobs:
- run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- run: npm run build --if-present
- run: npm test

25 changes: 24 additions & 1 deletion .github/workflows/npm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,28 @@ jobs:
- run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- run: npm run build --if-present
- run: npm test
- run: npm run build --if-present
- name: Extract deck version
id: deckversion
run:
echo "deck_version=$(npm run --silent currentversion 2> /dev/null);" >> $GITHUB_OUTPUT
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: '${{secrets.GETMYDECK_USER}}'
password: '${{secrets.GETMYDECK_TOKEN}}'
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.deckversion.outputs.deck_version }}
- name: Bump version
run: |
npm version patch -m "[skip ci] release"
git push origin main
git push --tags origin main
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build:
- npm run --silent currentversion 2> /dev/null
- >
if [ "$CI_COMMIT_REF_NAME" == "main" ]; then
echo "export DECK_VERSION=$(npm run --silent currentversion 2> /dev/null);" > version-vars.sh
echo "export DECK_VERSION=$(npm run --silent currentversion 2> /dev/null);" >> $GITHUB_OUTPUT
else
echo "export DECK_VERSION=$(npm run --silent currentversion 2> /dev/null)-SNAPSHOT;" > version-vars.sh
fi
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GetMyDeck-App

![Build](https://github.com/chrisingenhaag/getmydeck-app/actions/workflows/gradle-build.yml/badge.svg?branch=main)
![Build](https://github.com/chrisingenhaag/getmydeck-app/actions/workflows/npm-build.yml/badge.svg?branch=main)

SvelteKit based web frontend for [getmydeck.ingenhaag.dev](https://getmydeck.ingenhaag.dev)

Expand Down

0 comments on commit 8de30f9

Please sign in to comment.