Skip to content

Commit

Permalink
ci: Use @sebbo2002/semantic-release-docker instead of bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbo2002 committed Mar 3, 2024
1 parent d324b3f commit 0d11f5b
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 48 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/release-publish.sh

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
context: .
github-token: ${{ secrets.GITHUB_TOKEN }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/i386
pull: true
push: true
tags: |
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
context: .
github-token: ${{ secrets.GITHUB_TOKEN }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/i386
push: true
tags: ubud/server:${{ github.sha }}
labels: |
Expand Down Expand Up @@ -167,12 +167,13 @@ jobs:
- name: semantic-release
run: BRANCH=${GITHUB_REF#refs/heads/} npx semantic-release
env:
DOCKER_CLI_EXPERIMENTAL: enabled
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ubud
SENTRY_PROJECT: server
SENTRY_URL: ${{ secrets.SENTRY_URL }}
DOCKER_LOCAL_IMAGE_DH: ubud/server:${{ github.sha }}
DOCKER_LOCAL_IMAGE_GH: ghcr.io/${{ github.repository }}:${{ github.sha }}
NOTIFY_WEBHOOK_SECRET: ${{ secrets.NOTIFY_WEBHOOK_SECRET }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MICROBADGER_WEBHOOK_SECRET: ${{ secrets.MICROBADGER_WEBHOOK_SECRET }}
Expand Down
239 changes: 237 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"ofx": "^0.4.0"
},
"devDependencies": {
"@sebbo2002/semantic-release-docker": "^4.0.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
Expand Down
8 changes: 7 additions & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const plugins = [
'@semantic-release/changelog',
['@semantic-release/exec', {
prepareCmd: 'VERSION=${nextRelease.version} BRANCH=${options.branch} ./.github/workflows/release-prepare.sh',
publishCmd: 'VERSION=${nextRelease.version} BRANCH=${options.branch} ./.github/workflows/release-publish.sh',
successCmd: 'VERSION=${nextRelease.version} BRANCH=${options.branch} ./.github/workflows/release-success.sh'
}],
'@semantic-release/npm',
Expand All @@ -38,6 +37,13 @@ if (process.env.BRANCH === 'main') {
}]);
}

plugins.push(['@sebbo2002/semantic-release-docker', {
images: [
process.env.DOCKER_LOCAL_IMAGE_DH,
process.env.DOCKER_LOCAL_IMAGE_GH
]
}]);

module.exports = {
branches: [
{
Expand Down

0 comments on commit 0d11f5b

Please sign in to comment.