-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: update release workflow #352
Conversation
package.json
Outdated
@@ -36,8 +36,7 @@ | |||
"lint:fix": "eslint --max-warnings 0 --config .eslintrc . --fix", | |||
"generate:assets": "npm run generate:readme:toc", | |||
"generate:readme:toc": "markdown-toc -i README.md", | |||
"generate:docker": "docker build --tag asyncapi/server-api .", | |||
"release": "npm run generate:docker && semantic-release" | |||
"generate:docker": "docker build --tag asyncapi/server-api ." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now I noticed that release workflows here are mixed with docker release. There are some additional changes that you need to do, sorry about that
"generate:docker": "docker build --tag asyncapi/server-api ." | |
"docker:build": "docker build --tag asyncapi/server-api ." |
you also need to add a new file, called release-docker.yml
like below"
name: Release Docker Image
on:
release:
types:
- published
jobs:
publish-docker:
name: Generating Docker
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get version without v character
id: version
run: |
VERSION=${{github.event.release.tag_name}}
VERSION_WITHOUT_V=${VERSION:1}
echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT
- name: Release to Docker
run: |
echo ${{secrets.DOCKER_PASSWORD}} | docker login -u ${{secrets.DOCKER_USERNAME}} --password-stdin
npm run docker:build
docker tag asyncapi/server-api:latest asyncapi/server-api:${{ steps.version.outputs.value }}
docker push asyncapi/server-api:${{ steps.version.outputs.value }}
docker push asyncapi/server-api:latest
- uses: meeDamian/sync-readme@82715041300710d9be7c726c9d6c683b70451087 #version 1.0.6 https://github.com/meeDamian/sync-readme/releases/tag/v1.0.6
with:
user: ${{secrets.DOCKER_USERNAME}}
pass: ${{ secrets.DOCKER_PASSWORD }}
slug: asyncapi/server-api
description: Server with API that exposes various AsyncAPI tools like AsyncAPI Generator
@derberg made the changes 🙂 |
package.json
Outdated
@@ -79,9 +78,6 @@ | |||
}, | |||
"devDependencies": { | |||
"@semantic-release-plus/docker": "^3.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this too, and refresh package-lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@princerajpoot20 have a look please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derberg Done 👍 . Sorry for the delay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well done 👏🏼
@BOLT04 you can approve and merge
package.json
Outdated
@@ -36,8 +36,7 @@ | |||
"lint:fix": "eslint --max-warnings 0 --config .eslintrc . --fix", | |||
"generate:assets": "npm run generate:readme:toc", | |||
"generate:readme:toc": "markdown-toc -i README.md", | |||
"generate:docker": "docker build --tag asyncapi/server-api .", | |||
"release": "npm run generate:docker && semantic-release" | |||
"docker:build": "docker build --tag asyncapi/server-api ." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"docker:build": "docker build --tag asyncapi/server-api ." | |
"docker:build": "docker build --tag asyncapi/server-api .", | |
"bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION" |
please commit it as this is one more missing script that is required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derberg Done
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/rtm |
Description
Update release workflow.
Related issue(s)
Fixes #282
cc @derberg