KEMBAR78
Release: Add workflow for AUR publishing by mstruebing · Pull Request #161 · dotenv-linter/dotenv-linter · GitHub
Skip to content

Conversation

mstruebing
Copy link
Member

@mstruebing mstruebing commented Apr 22, 2020

I prepared a bit.

TODO:

  • create AUR account
  • inject SSH key into container
  • use ssh cloning of AUR repository
  • git tag is empty?
  • get correct version number in CI
  • run only on release

closes #116

@mstruebing mstruebing force-pushed the feat/116/automateAURRelease branch from 4ea6202 to 5a1170a Compare April 22, 2020 06:50
@codecov-io
Copy link

codecov-io commented Apr 22, 2020

Codecov Report

Merging #161 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #161   +/-   ##
=======================================
  Coverage   97.86%   97.86%           
=======================================
  Files          11       11           
  Lines         844      844           
=======================================
  Hits          826      826           
  Misses         18       18           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f947ff...b50f67d. Read the comment docs.

@mstruebing mstruebing force-pushed the feat/116/automateAURRelease branch 17 times, most recently from 9306eb1 to 80366ed Compare April 22, 2020 07:36
@mstruebing mstruebing changed the title WIP Release: Add workflow for AUR publishing #142 WIP Release: Add workflow for AUR publishing Apr 22, 2020
@mstruebing mstruebing force-pushed the feat/116/automateAURRelease branch 10 times, most recently from f6addb9 to 54b21b0 Compare April 22, 2020 12:41
@mstruebing mstruebing force-pushed the feat/116/automateAURRelease branch 6 times, most recently from 2f72d99 to 18f5e80 Compare April 22, 2020 12:59
@mstruebing mstruebing changed the title WIP Release: Add workflow for AUR publishing Release: Add workflow for AUR publishing Apr 22, 2020
@mstruebing
Copy link
Member Author

I think this should be ready now, I was able to publish a sample version to the AUR - the only thing which might not work would be the part to extract the tag.

@mstruebing mstruebing force-pushed the feat/116/automateAURRelease branch from 18f5e80 to 6623e79 Compare April 22, 2020 13:12
@@ -0,0 +1,42 @@
name: aur
Copy link
Member

Choose a reason for hiding this comment

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

What do you think if we move this job to the release workflow?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it should belong there you are very right :)

Copy link
Member

@mgrachev mgrachev Apr 27, 2020

Choose a reason for hiding this comment

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

Please move it to the release workflow and rename it to release-aur.

# see: https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167#M1027
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
Copy link
Member

Choose a reason for hiding this comment

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

Can we use this solution instead of the separate step?

GIT_TAG=$(git describe --tags `git rev-list --tags --max-count=1` | sed "s/v//")

I already use this solution in the release workflow.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've tried that but the problem is we don't check out the dotenv-linter itself so we don't have access to it's git repository - we only check out the dotenv-linter-bin repository from the AUR.
That's why I went with this solution.
Of course we could check out the dotenv-linter itself, but that would cost a bit of performance.

Do you think it would be worth it?

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for explaining me. I think no. Let's leave as is.

Comment on lines 37 to 38
git status && \
git diff && \
Copy link
Member

Choose a reason for hiding this comment

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

Are these commands needed for debug?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've decided to let them in for the first one or two releases to see immediately what went wrong if some error occurs and have easier debugging if you think this is useless noise and shouldn't be there until we have a problem I can remove it.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, let's leave as is.

@mgrachev
Copy link
Member

@mstruebing 👋Thank you for your contribution! 🚀Please look at the comments.

@mstruebing mstruebing force-pushed the feat/116/automateAURRelease branch 2 times, most recently from ca25ab2 to ac47433 Compare April 27, 2020 07:56
@mstruebing mstruebing force-pushed the feat/116/automateAURRelease branch from ac47433 to c7ebc82 Compare April 27, 2020 07:57
@mstruebing
Copy link
Member Author

It's rebased now and moved to release.yml

@mgrachev mgrachev merged commit ff34829 into master Apr 27, 2020
@mgrachev mgrachev deleted the feat/116/automateAURRelease branch April 27, 2020 08:52
@mgrachev
Copy link
Member

@mstruebing Thanks a lot! Excellent work! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Automate AUR releases

3 participants