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

Automate release with GitHub Action Job #121

Merged
merged 35 commits into from
Dec 4, 2020

Conversation

aggarw13
Copy link
Contributor

@aggarw13 aggarw13 commented Dec 3, 2020

Add a GitHub Action job to trigger a release process which includes operations of:

  1. Creating and pushing the release tag to the repository
  2. Verifying the pushed tag (performing a diff with the commit ID which is tagged)
  3. Creating a ZIP for the release asset.
  4. Verifying the ZIP by performing a diff check and running unit tests on the unzipped files. 5. Creating a release on the repository for the tag, and uploading the ZIP as the release asset

The workflow can be manually triggered and takes the input values of Commit ID (to create a release for) and the Version string for tagging the release with

Testing
Here is an example run of the release job on my fork repository:
https://github.com/aggarw13/coreMQTT/actions/runs/399119805.
It pushed the test tag (test-v2) and created a release along with the release asset on the repository: https://github.com/aggarw13/coreMQTT/releases/tag/test-v2

git submodule update --init --checkout --recursive
- name: Create ZIP
run: |
zip -r coreMQTT-${{ github.event.inputs.version_number }}.zip coreMQTT -x "*.git"
Copy link
Contributor

Choose a reason for hiding this comment

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

This will leave the .github folder in the zip. We were not doing that for the prior releases. I think it is better to avoid it.
The command can be modified to do that
zip -r coreMQTT-${{ github.event.inputs.version_number }}.zip coreMQTT -x "*.git*"

@aggarw13 aggarw13 merged commit 8431dbe into FreeRTOS:main Dec 4, 2020
@aggarw13 aggarw13 deleted the test/release-workflow branch December 4, 2020 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants