feat: Add currency support to emails #136
Workflow file for this run
This file contains hidden or 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: Post Merge Snapshot | |
| permissions: | |
| contents: write | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| branches: | |
| - develop | |
| jobs: | |
| snapshot: | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' || github.event.pull_request.merged == true | |
| outputs: | |
| frontend-artifact: ${{ steps.bump-snapshot.outputs.artifact-frontend }} | |
| backend-artifact: ${{ steps.bump-snapshot.outputs.artifact-backend }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ssh-key: ${{ secrets.COMMIT_KEY }} | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Bump frontend version | |
| run: | | |
| cd ./app/mikane/ | |
| npm --no-git-tag-version version prerelease --preid "SNAPSHOT" | |
| - name: Bump backend version | |
| run: | | |
| cd ./server/ | |
| npm --no-git-tag-version version prerelease --preid "SNAPSHOT" | |
| - name: Commit and push | |
| id: bump-snapshot | |
| run: | | |
| git config --global user.name "${GITHUB_ACTOR}" | |
| git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" | |
| git add "./app/mikane/package.json" | |
| git add "./app/mikane/package-lock.json" | |
| git add "./server/package.json" | |
| git add "./server/package-lock.json" | |
| version=$(cat ./server/package.json | jq -r '.version') | |
| echo "artifact-frontend=frontend-$version" >> $GITHUB_OUTPUT | |
| echo "artifact-backend=backend-$version" >> $GITHUB_OUTPUT | |
| git commit -m "chore: bump $version" | |
| - name: Push changes to repository | |
| run: | | |
| git push origin develop | |
| build-frontend: | |
| needs: snapshot | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Install frontend dependencies | |
| run: | | |
| cd ./app/mikane/ | |
| npm ci | |
| - name: Build frontend snapshot | |
| run: | | |
| cd ./app/mikane/ | |
| npm run build:test --if-present | |
| - name: Upload frontend artifact | |
| id: upload-artifact-frontend | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ needs.snapshot.outputs.frontend-artifact }} | |
| path: ./app/mikane/dist/mikane/browser/ | |
| build-backend: | |
| runs-on: ubuntu-latest | |
| needs: snapshot | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Install backend dependencies | |
| run: | | |
| cd ./server/ | |
| npm ci | |
| - name: Build backend snapshot | |
| run: | | |
| cd ./server/ | |
| npm run esbuild --if-present | |
| - name: Upload backend artifact | |
| id: upload-artifact-backend | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| if-no-files-found: error | |
| name: ${{ needs.snapshot.outputs.backend-artifact }} | |
| path: ./server/build/ | |
| test-frontend: | |
| needs: snapshot | |
| uses: ./.github/workflows/frontend-test.yml | |
| with: | |
| node-version: 24.x | |
| secrets: | |
| codecov_token: ${{ secrets.CODECOV_TOKEN }} | |
| test-backend: | |
| needs: snapshot | |
| uses: ./.github/workflows/backend-test.yml | |
| with: | |
| node-version: 24.x | |
| secrets: | |
| codecov_token: ${{ secrets.CODECOV_TOKEN }} | |
| deploy: | |
| needs: | |
| [snapshot, build-frontend, build-backend, test-frontend, test-backend] | |
| uses: ./.github/workflows/deploy.yml | |
| with: | |
| environment: test | |
| artifact-frontend: ${{ needs.snapshot.outputs.frontend-artifact }} | |
| artifact-backend: ${{ needs.snapshot.outputs.backend-artifact }} | |
| dry-run: false | |
| secrets: | |
| SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
| SSH_HOST: ${{ secrets.SSH_HOST }} | |
| SSH_USER: ${{ secrets.SSH_USER }} |