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

feat(build): add GitHub Action to make release #427

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

PsypherPunk
Copy link
Collaborator

@PsypherPunk PsypherPunk commented Jan 24, 2022

Add config. to, when a new tag is pushed:

  • build a .deb file using cargo-deb;
  • include the resulting .deb file in the subsequent release.

An example of one such release can be seen here.

Relates #83

@bee-san
Copy link
Member

bee-san commented Apr 7, 2024

Merge conflicts :(

@PsypherPunk
Copy link
Collaborator Author

@bee-san, I can look to resolve these but is there still interest in this PR?

@bee-san
Copy link
Member

bee-san commented Apr 7, 2024

@bee-san, I can look to resolve these but is there still interest in this PR?

Oooh great question!

We have this release.yaml https://github.com/RustScan/RustScan/blob/master/.github/workflows/release.yml

But it does not do .deb , and we'd like to make it do .deb 😅

I am thinking you can just copy this PR's yaml into that one?

@PsypherPunk
Copy link
Collaborator Author

@bee-san, sure, I'll take a look. There's some nice matrix-build steps going on in there so I'll try to do something with it.

@bee-san
Copy link
Member

bee-san commented Apr 7, 2024

@bee-san, sure, I'll take a look. There's some nice matrix-build steps going on in there so I'll try to do something with it.

Thank you, that would honestly be awesome. Before this we had a bulky Docker-builder to set up debs (feel free to delete https://github.com/RustScan/RustScan/tree/master/rustscan-debbuilder in your PR) 🙈

Because of how cumbersome it was, new releases don't have .deb files :(

I was just saying today one of the most important things I should add is .deb building automation!!

@PsypherPunk PsypherPunk force-pushed the 83-release-deb branch 3 times, most recently from ceea86c to 5b05f23 Compare April 8, 2024 08:38
@PsypherPunk PsypherPunk marked this pull request as draft April 8, 2024 08:47
@PsypherPunk PsypherPunk force-pushed the 83-release-deb branch 10 times, most recently from f37a78c to cdb21dd Compare April 8, 2024 11:19
@PsypherPunk
Copy link
Collaborator Author

PsypherPunk commented Apr 8, 2024

@bee-san, PR updated.

I've moved it to draft in case you have feedback; there's on odd line to which I've added a comment; it works—you can see the resulting release here—but there's probably a much better way to handle it (I could pull out the version as is done later and resolve the path to the .deb complete, I suppose).

@PsypherPunk PsypherPunk force-pushed the 83-release-deb branch 3 times, most recently from 3368fc1 to 5c21d3f Compare April 8, 2024 12:17
@PsypherPunk PsypherPunk marked this pull request as ready for review April 8, 2024 12:31
@bee-san
Copy link
Member

bee-san commented Apr 8, 2024

want me to review? looks ok to you? :)

@PsypherPunk
Copy link
Collaborator Author

@bee-san, it works insofar as it generate a .deb file and attaches it to a release as per the existing release.yml so…yes 😬

As long as you're happy with the changes (and I deleted the right files you mentioned) then LGTM.

@bee-san
Copy link
Member

bee-san commented Apr 9, 2024

@bee-san, it works insofar as it generate a .deb file and attaches it to a release as per the existing release.yml so…yes 😬

As long as you're happy with the changes (and I deleted the right files you mentioned) then LGTM.

Thanks!!

We only build for x86_64-linux? Do you think we should use the matrix to add support for more architectures or? 🤔

@PsypherPunk
Copy link
Collaborator Author

I'm assuming it would only make sense to build .deb files for Linux and the only arch. is currently x86_64-linux…?

If that changes (say, adding i686), it should just be a matter of changing those == 'x86_64-linux' checks to =~ 'linux' or similar.

However, I'd probably consider doing that in a separate PR, once this one's proven with the existing arch./release-process…?

@bee-san
Copy link
Member

bee-san commented Apr 9, 2024

I'm assuming it would only make sense to build .deb files for Linux and the only arch. is currently x86_64-linux…?

If that changes (say, adding i686), it should just be a matter of changing those == 'x86_64-linux' checks to =~ 'linux' or similar.

However, I'd probably consider doing that in a separate PR, once this one's proven with the existing arch./release-process…?

Ok thank you! GitHub's matrix sucks :P

@bee-san bee-san merged commit 1ec8ab4 into RustScan:master Apr 9, 2024
10 checks passed
@PsypherPunk
Copy link
Collaborator Author

PsypherPunk commented Apr 9, 2024

Thanks, @bee-san! If anything does go awry with this during the next release, please let me know and I'll aim to fix.

@PsypherPunk PsypherPunk deleted the 83-release-deb branch April 9, 2024 08:26
@bee-san
Copy link
Member

bee-san commented Apr 21, 2024

It appears the release did not run? :(

https://github.com/PsypherPunk/RustScan/actions/workflows/release.yml

name: Release
on:
  push:
    tags:
      - '[0-9]+.[0-9]+.[0-9]+'
  pull_request:
    branches:
      - master
    paths:
      - 'Cargo.toml'
      - 'Cargo.lock'
      - '.github/workflows/release.yml'

The latest tag is 2.2.2, I am nto sure why it would not run :(

https://github.com/RustScan/RustScan/releases/tag/2.2.2

@PsypherPunk
Copy link
Collaborator Author

@bee-san, can I check how you actually created the tag?

Not entirely sure if/why that would matter but I'll take a look 😬

@bee-san
Copy link
Member

bee-san commented Apr 21, 2024

@bee-san, can I check how you actually created the tag?

Not entirely sure if/why that would matter but I'll take a look 😬

I made it in GitHub releases with
image

thank you for your contributions!

@bee-san
Copy link
Member

bee-san commented Apr 21, 2024

image

Ok so it did run eventually, that's nice to know!! Docker and homebrew did not like it, stuff to fix 😂

@PsypherPunk
Copy link
Collaborator Author

Phew! And there's a .deb an' everything!

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.

None yet

2 participants