ZigEmbeddedGroup / microzig

Unified abstraction layer and HAL for several microcontrollers
zlib License
1.17k stars 89 forks source link

Update Workflows #232

Open EliSauder opened 1 month ago

EliSauder commented 1 month ago

Ello, here is a done pipeline for the main zig tooling/library. It still needs the website stuff (will be working on that next).

How things work and names and everything can be changed. I just wanted to get this out here for people to start looking at.

Implemented functionality:

CI Update TODO:

Microzig Repo TODO:

Remarks

EliSauder commented 1 month ago

Realized I forgot to mention it in the main PR message. This currently also includes some cleanup effort. I've removed a lot of the LICENSE files except from the root of the project and from each of the tools. I also removed old workflows, unused files, etc.

EliSauder commented 1 month ago

Update: I removed the dependency of having a separate PAT. GITHUB_TOKEN has permission configurations available. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token

EliSauder commented 1 month ago

Update: I removed the dependency of having a separate PAT. GITHUB_TOKEN has permission configurations available. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token

After doing some more testing I re-realized why I did the PAT method over continuing with the GITHUB_TOKEN. The reason is that with using GITHUB_TOKEN, it will not trigger workflows (i.e. the zig-master build workflow). Here is the section in the documentation about it. https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#triggering-a-workflow-from-a-workflow

Here is the specific paragraph that is relavent to enabling this ability:

If you do want to trigger a workflow from within a workflow run, you can use a GitHub App installation access token or a personal access token instead of GITHUB_TOKEN to trigger events that require a token.

EliSauder commented 1 month ago

Zon version overriding added. This can be removed if desired, however, based on my idea on what the publish should do, everything in the repo should be versioned together. As such, the publish workflow will now overwrite the version specified in all of the zon files with the tag that is provided.

Notes: This overwrite will only occur if the version is a semver or a semver prefixed by v.

Example generation with a tag: v0.12.2.-beta25.

image image image
EliSauder commented 6 days ago

Update:

Features added:

Microzig repository variables/secrets needed:

image
EliSauder commented 6 days ago

I additionally added some of the commits from #229 to enable the website to build so I could validate that it worked.