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 generation through Github actions #193

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

ronny-rentner
Copy link

Hey, I am not sure if you are interested in this.

I've built a Github workflow to automatically generate a release including pulling in GTK4 CSS from libadwaita and including a Debian package.

As a next step, I plan to publish those releases on a PPA so they can easily be installed and automatically updated.

@lassekongo83
Copy link
Owner

Is there anything I need to change or think about, or is it all handled automatically? I don't know much about Github workflow.

@ronny-rentner
Copy link
Author

ronny-rentner commented Nov 14, 2022

I've just realized you can delete sync-fork.yml. You will not need this workflow obviously.

The release process is in two stages:

  1. Build everything and create the release packages.
  2. Actually publish the release on Github.

With the current configuration, the first stage is run on every push on every branch (to see if building and compiling still works). Other tests could be included here. The resulting files will only be attached as artifacts to the build and automatically deleted after some days.

For all pushes to the main branch, both stages are run, so it will also actually publish the packages from the first phase.

In release.yml, lines 3-6, this is the configuration for when to run the first phase:

on:
  workflow_dispatch: # on button click
  push:
#    branches: [ "main" ]

It also gives you a button in Github Actions to manually trigger a build (for testing). You can also comment the "push:" line to have it only on button press. Please note that the button only appears in Github Actions if you have the workflow in your main branch. This is a limitation of Github. Other triggers like "push:" will also work from any branch.

The second phase is limited to the main branch in lines 44-45:

    - name: Release
      if: github.ref == 'refs/heads/main'

You probably want to set prerelease: true in line 51.

Please note that releases contain a date tag and are updated if you have multiple commits per day to the main branch.

The configuration for releases is line 48-55 in release.yml.
It's currently configured to create daily (nightly) release from the main branch. If you wanted to, I could adapt it for normal releases but you might want to have more control on the body text and other things for normal releases.

Let me know if you have further questions.

ronny-rentner and others added 3 commits February 4, 2023 02:25
* Add Makefile
* Add libadwaita submodule
* Add release workflow
* Add Debian & RPM package building
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

2 participants