Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions .github/workflows/check-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check Version

on:
push:
branches: ['test', 'stage', 'main']
branches: ["main"]
workflow_dispatch:

env:
Expand All @@ -20,25 +20,9 @@ jobs:
- name: Docker Setup BuildX
uses: docker/setup-buildx-action@v2

- name: Bump Patch Version
run: npm run bump-patch
if: ${{ env.BRANCH == 'test' }}

- name: Sync Version
run: npm run sync-version
if: ${{ env.BRANCH != 'test' }}

- name: Generate Changelog
run: npm run changelog

- name: Push changes to repo
run: |
git config --global user.name ${{ secrets.ADMIN_NAME }}
git config --global user.email ${{ secrets.ADMIN_EMAIL }}
git add .
git commit -m "docs: update version"
git push

- name: Load environment variables
run: |
awk -v branch="${{ env.BRANCH }}" ' /^[0-9a-zA-Z]+$/ { current_branch = $0; } current_branch == branch && /^[A-Z_]+=/{ print $0; }' release.env >> $GITHUB_ENV
Expand All @@ -53,7 +37,6 @@ jobs:
run: |
echo "Building Docker image for branch: ${{ env.BRANCH }} major: ${{ env.MAJOR }} minor: ${{ env.MINOR }} patch: ${{ env.PATCH }}"
docker image build --tag $DOCKER_TAG_CUSTOM --no-cache .
if: ${{ env.BRANCH == 'test' }}

- name: Log in to GitHub container registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
Expand All @@ -62,11 +45,9 @@ jobs:
run: |
echo "Pushing Docker image to GitHub Packages"
docker push $DOCKER_TAG_CUSTOM
if: ${{ env.BRANCH == 'test' }}

- name: Create Release
uses: softprops/action-gh-release@v1
if: ${{ env.BRANCH == 'main' }}
with:
tag_name: v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}
generate_release_notes: true
Expand Down
96 changes: 0 additions & 96 deletions bump-version.sh

This file was deleted.

6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@
"test:e2e": "vitest --config ./vitest.config.e2e.mts",
"test:e2e:run": "vitest run --config ./vitest.config.e2e.mts",
"prepare": "husky",
"changelog": "./generate-changelog.sh",
"sync-version": "./sync-version.sh",
"bump-patch": "./bump-version.sh patch",
"bump-minor": "./bump-version.sh minor",
"bump-major": "./bump-version.sh major"
"changelog": "./generate-changelog.sh"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.1031.0",
Expand Down
15 changes: 0 additions & 15 deletions release.env
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
dev
MAJOR=1
MINOR=1
PATCH=0

test
MAJOR=1
MINOR=1
PATCH=0

stage
MAJOR=1
MINOR=1
PATCH=0

main
MAJOR=1
MINOR=1
Expand Down
50 changes: 0 additions & 50 deletions sync-version.sh

This file was deleted.

Loading