From cb9b42c6cac36d5fe978974b5967b703ecf0d9e6 Mon Sep 17 00:00:00 2001 From: Avram Walden Date: Mon, 9 Oct 2023 14:31:55 -0700 Subject: [PATCH] ci(release): switches back to semantic-release (#161) --- .cz.toml | 3 --- .github/workflows/release.yml | 36 ++++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 16 deletions(-) delete mode 100644 .cz.toml diff --git a/.cz.toml b/.cz.toml deleted file mode 100644 index 02aafdbf3..000000000 --- a/.cz.toml +++ /dev/null @@ -1,3 +0,0 @@ -[tool.commitizen] -version = "0.1.0" -version_files = "package.json:3" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 861d778cf..0e7f0d208 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,20 +6,30 @@ on: - main jobs: - bump_version: - if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }} + release: runs-on: ubuntu-latest - name: "Bump version and create changelog with commitizen" + + name: "Bump version and publish docker image" + steps: - name: Check out uses: actions/checkout@v3 - with: - fetch-depth: 0 - token: "${{ secrets.GITHUB_TOKEN }}" - - id: cz - name: Create bump and changelog - uses: commitizen-tools/commitizen-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Print Version - run: echo "Bumped to version ${{ steps.cz.outputs.version }}" + + - name: Version Bump + run: | + npm install -g semantic-release + semantic-release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Docker Image + run: | + docker-compose -f docker-compose.yml build + + - name: Authenticate to GitHub Container Registry + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin + + - name: Push Docker Image to GitHub Packages + run: | + docker tag your-image-name:tag ghcr.io/${{ github.repository_owner }}/your-image-name:tag + docker push ghcr.io/${{ github.repository_owner }}/your-image-name:tag