Skip to content

Commit

Permalink
Add readme to release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Taucher2003 committed Nov 17, 2023
1 parent 38105d3 commit 4f78fb9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ This action takes care of the following things:

Create a workflow with the following content.

Replace `<version>` with the release you want to use.

Replace `<project-id>` with the ID of the project you created in step one.
The snippet assumes that the secret from step 2 and 3 were created with the name `GL_API_TOKEN` and `GL_RUNNER_TOKEN`.

Expand Down
10 changes: 8 additions & 2 deletions release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

version = ARGV.shift

readme = File.read 'README.md'
readme_for_version = readme.gsub("Taucher2003/GitLab-Pipeline-Action@<version>", "Taucher2003/GitLab-Pipeline-Action@#{version}")
File.write 'README.md', readme_for_version

action = File.read 'action.yml'
action_for_version = action.gsub(" image: 'Dockerfile'", " image: 'ghcr.io/taucher2003/gitlab-pipeline-action:#{version}'")
File.write 'action.yml', action_for_version

system("git add action.yml")
system("git add README.md action.yml")
system("git commit -m 'Create release for #{version}'")
system("git tag #{version}")

File.write 'README.md', readme
File.write 'action.yml', action
system("git add action.yml")

system("git add README.md action.yml")
system("git commit -m 'Reset action to development version'")

0 comments on commit 4f78fb9

Please sign in to comment.