Skip to content

Commit

Permalink
feat: move automation from workflow to releaserc
Browse files Browse the repository at this point in the history
  • Loading branch information
Shurtu-gal committed Jan 9, 2024
1 parent 31cd450 commit 174627f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
VERSION=${{github.event.release.tag_name}}
VERSION_WITHOUT_V=${VERSION:1}
echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT
- name: Update version in action.yml
run: |
sed "s/docker:\/\/asyncapi\/github-action-for-cli:.*$/docker:\/\/asyncapi\/github-action-for-cli:${{ steps.version.outputs.value }}'/g" action.yml > action.yml.tmp
mv action.yml.tmp action.yml
- name: Release to Docker
run: |
echo ${{secrets.DOCKER_PASSWORD}} | docker login -u ${{secrets.DOCKER_USERNAME}} --password-stdin
Expand Down
2 changes: 2 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ plugins:
- preset: conventionalcommits
- - "@semantic-release/release-notes-generator"
- preset: conventionalcommits
- - "@semantic-release/exec"
- prepareCmd: sed "s/docker:\/\/asyncapi\/github-action-for-cli:.*/docker:\/\/asyncapi\/github-action-for-cli:${nextRelease.version}'/g" action.yml > action.yml.tmp && mv action.yml.tmp action.yml
- "@semantic-release/github"
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export GITHUB_WORKSPACE = $(shell pwd)
run:
@bash ./entrypoint.sh $(DEFAULT_VERSION) $(DEFAULT_COMMAND) $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS)

# Updates the action.yml file with the latest version of the action got from $VERSION env variable
generate-assets:
sed "s/docker:\/\/asyncapi\/github-action-for-cli:.*/docker:\/\/asyncapi\/github-action-for-cli:${VERSION}'/g" action.yml > action.yml.tmp
@mv action.yml.tmp action.yml

test: test-default test-validate-success test-validate-fail test-custom-output test-custom-commands test-optimize test-bundle test-convert

# Test cases
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "github-action-for-cli",
"description": "This is to be used for running tests for the GitHub Action using the MakeFile",
"version": "3.0.0",
"version": "3.0.1",
"scripts": {
"test": "make test",
"generate:assets": "echo 'No additional assets need to be generated at the moment'",
"docker:build": "docker build -t asyncapi/github-action-for-cli:latest .",
"bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION"
"bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION && make generate-assets"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 174627f

Please sign in to comment.