Skip to content
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

Automatic release and versioning #197

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Conversation

DevOpsDave
Copy link
Contributor

@DevOpsDave DevOpsDave commented Jan 5, 2024

Change Log Items

  • Implement automated semver versioning and release via github actions.

Description

Implement automated semver versioning and release via github actions. Versioning and release happens automatically on PR merge. Must have release label set before merging.

Rally: US852217: [Continued] ALKS TFP - Automate CI/CD pipeline with Github Actions

working...

working...

Experimenting with autotagger.

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

update...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

Experimenting with autotagging...

experiment.

typo...

typo...

update..

update..

Renamed workflow from check-for-release-tag to check-for-release label.  More appropriately named.

Renamed workflow from check-for-release-tag to check-for-release label.  More appropriately named.

Renamed workflow from check-for-release-tag to check-for-release label.  More appropriately named.

update...

updated version of action-release-label.

update...

update...

update...

update...

update...

update...

Fixing logic in check for release.

Fixing logic in check for release.

Fixing logic in check for release.
.gitignore Outdated
Comment on lines 22 to 25
package-lock.json
package.json
test.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on this? What testing framework outside of go test? This may be of benefit to the team if you found a nice tool.

Copy link
Contributor Author

@DevOpsDave DevOpsDave Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this was put in because I was attempting to run GH actions locally, and ultimately test without actually running in the repo and making changes. It was a passing try and I didn't spend too much time on it. Ultimately it was easier to simply model out the behavior I wanted in a separate repo, got it to work the way I wanted and then copy pasta'ed to this one.

Here is the content of package-json and test.js if you are curious:

{
  "dependencies": {
    "@actions/core": "^1.10.1",
    "@actions/exec": "^1.1.1"
  }
}
const core = require('@actions/core');
const exec = require('@actions/exec');

async function run() {
try {
// Set the input variables (if any)
core.getInput('myInputVariable');

// Execute the steps of our workflow
await exec.exec('echo', ['Hello, World!']);
// Add more steps as necessary

// Set the output variables (if any)
// Set the output variables (if any)
core.setOutput('myOutputVariable', 'Hello from local testing!');
} catch (error) {
core.setFailed(error.message);
}
}

If you are curious where I modeled the actions I did it here, should be 0 Cox properties in this public repo:
https://github.com/DevOpsDave/testing-github-actions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LumaC0 I removed the testing stuff from my repo and took out the .gitignore entiries that hid the artifacts since nothing was actually being done with it. Neater now.

if: ${{ steps.release-label.outputs.level != null }}
with:
version: latest
args: release --rm-dist
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at past runs, I see a deprecation warning for --rm-dist. It's recommended to use--clean instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LumaC0 Fixed.

americk0
americk0 previously approved these changes Jan 18, 2024
Copy link
Member

@americk0 americk0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

… that hid the testing artfacts. Since nothing was actually being done with them.
@DevOpsDave DevOpsDave merged commit aa15a24 into master Jan 18, 2024
3 checks passed
@DevOpsDave DevOpsDave deleted the US852217-automatic-release branch January 18, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants