Skip to content

Initial version of the build release artifacts workflow. #4287

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

Merged
merged 2 commits into from
Nov 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/build-release-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Release Artifacts

on:
workflow_dispatch:
pull_request:
branches:
- 'releases/**'
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought the release branches are named *.release in create_releases.yml?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

branches: limits what target branches the action applies to. What we currently do, for example, is:

M122 <-- M122.release

The PR has as target 'M122'. I'm going to change create_releases.yml to prepend releases/ to both branches. It's going to look like this

releases/M122 <--- releases/M122.release

then the check will work


jobs:
build-artifacts:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- name: Perform gradle build
run: |
./gradlew firebasePublish -PprojectsToPublish=firebase-firestore -PpublishMode=RELEASE -PincludeFireEscapeArtifacts=true
Copy link
Contributor

Choose a reason for hiding this comment

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

I think hardcoding is good in this initial version. Eventually we want to make the value of -PprojectsToPublish coming from release.cfg?

What I'm thinking -- Maybe we can make a custom action around release.cfg (for its creation, parsing, etc). That way it is possible to be used in multiple workflows and its input/output format can be defined based on its intended usage.

Although this is just one way to design it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we don't have this define just yet. One idea is to have a gradle command that's going to output the list of projects to publish direclty, and then use that output as input for this command. Or, we can tentatively use the configuration too.

Now that you bring it up, we can use the configuration, and as fallback, use the command, if available. I'll do it in a follow up PR. Thanks!

- name: Upload generated artifacts
uses: actions/upload-artifact@v2
with:
name: release_artifacts.zip
path: build/*.zip
retention-days: 5