Commit Graph

26 Commits

Author SHA1 Message Date
Pascal Hartig
6a28a712f9 Hopefully fix flipper-release npm publish step (#3366)
Summary:
This is really stupid but the download creates a directory with the same name before putting the file in it. I think `v2` no longer does but hey, this is the devil we know.

You can look at the actions further down to see that we reference all the other downloads by `filename/filename` as well, so this should do it.

Pull Request resolved: https://github.com/facebook/flipper/pull/3366

Test Plan: Another release, I'm afraid. This is a step you cannot dry-run.

Reviewed By: cekkaewnumchai, aigoncharov

Differential Revision: D33842700

Pulled By: passy

fbshipit-source-id: d6f7a4a711ec056ba16f13c72f2c550e9a632ac0
2022-01-28 06:32:51 -08:00
Pascal Hartig
c1d5a2c62f Back out "Temporarily remove flipper-server release steps"
Summary:
Original commit changeset: 1117a177c8eb

Original Phabricator Diff: D33584907 (8a3f48d7a4)

Reviewed By: aigoncharov

Differential Revision: D33585460

fbshipit-source-id: b4a220f7ddb1ce8aee24427df7cb81982ec431ce
2022-01-17 05:48:31 -08:00
Pascal Hartig
8a3f48d7a4 Temporarily remove flipper-server release steps (#3291)
Summary:
It's late Friday now and we still don't have a release out.

Let's revert this once we've got one stable build out.

Pull Request resolved: https://github.com/facebook/flipper/pull/3291

Reviewed By: fabiomassimo

Differential Revision: D33584907

Pulled By: passy

fbshipit-source-id: 1117a177c8eb12c7db69a53ad0bc949b53aaf04f
2022-01-14 09:26:46 -08:00
Pascal Hartig
9451911709 Fix windows build (for real this time?) (#3289)
Summary:
This previous attempt didn't work. Not even sure what happens now, it seems to just return the result of a boolean evaluation? Cool.

Still haven't verified that this works in the release build but noticed that we do effectively the same in the build step. By upgrading to the same revision of the action we use and then switching from `&&` to simply `;`, we can be reasonably sure that this will work now.

The alternative would be to switch to `pwsh` which appears to be the new name. `powershell` is the default shell and seems to be an older version without support for `&&`. I honestly never want to touch this or read about it again, so let's go with the simpler option.

Pull Request resolved: https://github.com/facebook/flipper/pull/3289

Reviewed By: aigoncharov

Differential Revision: D33582853

Pulled By: passy

fbshipit-source-id: 7c70ff360a5c327139b6ecb5463e85883a2caf9d
2022-01-14 06:30:38 -08:00
Michel Weststrate
ff0d5f2736 fix release build, attempt 2
Summary: Fix flipper-server release. Fixes https://github.com/facebook/flipper/runs/4803844153?check_suite_focus=true

Reviewed By: lblasa

Differential Revision: D33566443

fbshipit-source-id: 7610c4f73841a66ed9104f8ec0626d6d99bf5a71
2022-01-13 06:24:07 -08:00
Pascal Hartig
d825bd29c2 Fix Windows release job (#3282)
Summary:
I'm not entirely sure why this broke. Some Powershell versions
support `&&` but others don't. Something downgraded us, apparently.

Failing job: https://github.com/facebook/flipper/runs/4791210127?check_suite_focus=true
Issue: https://github.com/facebook/flipper/issues/3281
Stackoverflow post I copy-pasted from: https://stackoverflow.com/questions/65627536/the-token-is-not-a-valid-statement-separator-in-this-version

Pull Request resolved: https://github.com/facebook/flipper/pull/3282

Test Plan: New release, I reckon.

Reviewed By: aigoncharov

Differential Revision: D33565457

Pulled By: passy

fbshipit-source-id: 1751a84fc86d10ee87c60feecb07947e9d5780cf
2022-01-13 04:30:32 -08:00
Michel Weststrate
582ea64011 Publish flipper-server to NPM (#3224)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/3224

Automatically publish to https://www.npmjs.com/package/flipper-server

Changelog: [experimental] It is now possible to run a full fledged Flipper as node + browser appication by using `npx flipper-server`

Pull Request resolved: https://github.com/facebook/flipper/pull/3224

Test Plan:
https://github.com/facebook/flipper/runs/4659854128?check_suite_focus=true

Checked that the build is non-fb, has no fb plugins etc, and runs from npm

{F690008124}

{F690008123}

{F690008122}

Reviewed By: nikoant

Differential Revision: D33297125

Pulled By: mweststrate

fbshipit-source-id: b5fe6fcb81c665036273db814cb61855aaceff85
2022-01-04 04:13:10 -08:00
Michel Weststrate
efdf9d2d64 Upgrade GH retry action so that stdout/ stderr is captures (#3211)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/3211

The GH retry action did ate all the stdout / stderr, so if the retry fails, it was completely unclear why. This was fixed in a newer version of the action

Reviewed By: antonk52

Differential Revision: D33308437

fbshipit-source-id: a599161e0c72b95b35e6ecab8cd84c6fa7027cd3
2021-12-24 07:15:23 -08:00
Pascal Hartig
93bc23e9cd Potential fix for artefact upload issue
Summary:
I've been investigating the now persistent upload issue for our artifacts and it appears to come down to artifacts being uploaded and downloaded as folder structures while they used to be individual files.

Annoyingly, the `ghr` tool we use for uploading throws a cryptic and misleading error: https://github.com/facebook/flipper/runs/4314584032?check_suite_focus=true

There is some more control in the `v2` version of the actions but for now, this seems like the safer option to fix this problem.

{F682461661}

Reviewed By: lblasa

Differential Revision: D32649218

fbshipit-source-id: 47ebefc434cb3b928b82a9fe8da3002b7b8465b6
2021-11-24 09:52:46 -08:00
Pascal Hartig
d9848ab6cf Upgrade upload action
Summary:
Fixed an issue with the setup of the retry script:

31ee58a796

Reviewed By: nikoant

Differential Revision: D32644463

fbshipit-source-id: 23ac1508784f24e9403e0bca0091f05847a9e91d
2021-11-24 06:31:15 -08:00
Pascal Hartig
dbe9106762 Create issue on publish failure (#3071)
Summary:
We've done this for the "release" part of the workflow
before but need to handle the "publish" branch separately.

Pull Request resolved: https://github.com/facebook/flipper/pull/3071

Test Plan: _eyes

Reviewed By: nikoant

Differential Revision: D32532348

Pulled By: passy

fbshipit-source-id: 622ed99ba509d4eaf7671e9b6ff3adbab277ab4e
2021-11-18 09:28:13 -08:00
Pascal Hartig
1b54a079f5 Upgrade upload actions (#3070)
Summary:
We're seeing some spurious failures, unrelated to any changes on our end.

I've upgraded the action to do two things:

- Retry on failure (up to three times): b0dfcdf1c7
- Replace the artefact if it's already present (otherwise this might fail subsequent retries): 92bec0ba48

Pull Request resolved: https://github.com/facebook/flipper/pull/3070

Reviewed By: nikoant

Differential Revision: D32532277

Pulled By: passy

fbshipit-source-id: f1899c89c405772490958674fa7f46f479c666f9
2021-11-18 08:50:26 -08:00
Pascal Hartig
c4fe39f413 Add failure issue tracking for release task (#3025)
Summary:
This failed without giving us a notification.

Pull Request resolved: https://github.com/facebook/flipper/pull/3025

Reviewed By: nikoant

Differential Revision: D32246987

Pulled By: mweststrate

fbshipit-source-id: da04b5d8e7e50480bdb0e0a5b55d387b0b23eced
2021-11-09 04:09:52 -08:00
Pascal Hartig
4736abc29c Upgrade publish action
Summary: I upgraded the docker image which should pull the latest GHR release (https://github.com/tcnksm/ghr).

Reviewed By: lblasa

Differential Revision: D31442256

fbshipit-source-id: 0f9fa81ec1be1285aea3da621b7ef5a1e63c3e84
2021-10-08 03:40:49 -07:00
Pascal Hartig
111177b44e Upgrade to Node 14 for Actions (#2928)
Summary:
I believe that matches what we have internally. This has been causing some upgrades to fail.

Pull Request resolved: https://github.com/facebook/flipper/pull/2928

Reviewed By: aigoncharov

Differential Revision: D31324394

Pulled By: passy

fbshipit-source-id: eec38dcc6322e3e8957bbc20bf74d343855be8c0
2021-10-01 04:40:09 -07:00
Pascal Hartig
781df776f2 Rename default branch references to main (#2689)
Summary:
I really hope I hit everything and didn't break anything that wasn't
referring to branch names.

Pull Request resolved: https://github.com/facebook/flipper/pull/2689

Test Plan:
_eyes

CI

|[Site Preview: flipper](https://our.intern.facebook.com/intern/staticdocs/eph/D30305789/V2/flipper/)

Reviewed By: timur-valiev

Differential Revision: D30305789

Pulled By: passy

fbshipit-source-id: 5daaa09250bb96bb50be679fc01dae86c666eb73
2021-08-13 15:00:39 -07:00
Pascal Hartig
7fd0c7d82e Fix upload of sample app apk (#1920)
Summary:
This was an expected failure, you can see here how the last step of the "Publish Android" workflow currently fails: https://github.com/facebook/flipper/runs/1873750507?check_suite_focus=true

This is because it no longer runs in a tagging context. We're now providing the tag as an input and my custom action knows how to attach to existing tags by name.

Pull Request resolved: https://github.com/facebook/flipper/pull/1920

Test Plan:
Test run here finished successfully: https://github.com/passy/flipper-1/actions/runs/560774414
Publish Android job: https://github.com/passy/flipper-1/actions/runs/560775419
Attached release: https://github.com/passy/flipper-1/releases/tag/v0.0.7
Artifacts on Central: https://repo.maven.apache.org/maven2/com/facebook/flipper/flipper/0.0.7/

{F372552533}

{F372552532}

Reviewed By: mweststrate

Differential Revision: D26402629

Pulled By: passy

fbshipit-source-id: 7290e6bb8d1078ee20a0cf10105dc37f1e7aa99a
2021-02-12 04:36:11 -08:00
Pascal Hartig
0085a0d140 Set up release automation (#1915)
Summary:
Depends on https://github.com/facebook/flipper/issues/1914.
This sets up the workflows for automatically building, publishing and "closing" the repository on Maven Central, which is a step you usually need to do manually in the web UI.

Still need to transfer all the secrets over to this repo for it to work.

Pull Request resolved: https://github.com/facebook/flipper/pull/1915

Test Plan:
Ran all of this in my this in my fork and released some `0.0.x` versions.

- Successful workflow: https://github.com/passy/flipper-1/actions/runs/552170713
- It's actually all on Maven: https://repo.maven.apache.org/maven2/com/facebook/flipper/

Reviewed By: jknoxville

Differential Revision: D26367469

Pulled By: passy

fbshipit-source-id: d65f64ee8eec1dc71af64b7e0f87473b9c956fec
2021-02-10 07:16:32 -08:00
Pascal Hartig
30628c8139 Publish npm packages from Action
Summary: Adds an action for publishing packages to npm. Secret was added as part of T80403944.

Reviewed By: nikoant

Differential Revision: D25195740

fbshipit-source-id: 51d43d9f5e84a25a67b637233b2c62a9a1a15063
2020-11-27 09:30:06 -08:00
Anton Nikolaev
46a1ac5947 Fix github release script
Summary: Just a small mispelling in step specification

Reviewed By: mweststrate

Differential Revision: D25053437

fbshipit-source-id: 39e7c9c578a448495b92f8aa3632b2843d79490c
2020-11-18 10:07:09 -08:00
Pascal Hartig
9a3cd63d55 Pin workflow actions (#1687)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1687

I cleaned up and tagged both of the custom actions.
It's much better to pin them down properly so that
future changes on `main` don't break anything.

Reviewed By: nikoant

Differential Revision: D24996462

fbshipit-source-id: 6d63e76b758439ba8df4ef2f5b77992789744e7b
2020-11-16 13:03:57 -08:00
Pascal Hartig
30d212da65 Select release commit from larger push (#1678)
Summary:
GitHub only issues one push event for multiple commits.
This causes things to behave weirdly. My action now
looks for a commit with a certain message and runs
the subsequent steps on it. If there's more than one
matching commit, it uses the last one. Not great, not terrible.

Pull Request resolved: https://github.com/facebook/flipper/pull/1678

Test Plan: Ran it on my fork: https://github.com/passy/flipper-1/actions/runs/360332680

Reviewed By: nikoant

Differential Revision: D24955986

Pulled By: passy

fbshipit-source-id: 6dcbe11e69bf77c803e3907ced3185ca85483ec8
2020-11-16 11:05:30 -08:00
Pascal Hartig
50f2b0db5f Trigger publish-pods from release workflow
Summary: Had the `PERSONAL_TOKEN` put in place by the OSS oncall. Still won't know if it has the right permissions until we run this. :/

Reviewed By: nikoant

Differential Revision: D24833829

fbshipit-source-id: 4fbf6e0b0abbc50d0b9a1e9b7ca8b02f6e1f5171
2020-11-10 04:24:58 -08:00
Pascal Hartig
d28610a9d2 Add retries to release GitHub Action
Summary:
Noticed that the icon download fails occasionally from GitHub.
This adds a few retries in case that happens.

Reviewed By: nikoant

Differential Revision: D24647690

fbshipit-source-id: 3ed84cb0972b7715fd87c8b1e1e1bca9f89485a9
2020-11-05 05:17:29 -08:00
Pascal Hartig
1fde900fcc Pin down custom actions
Summary:
I tagged my repos so messing on `master` won't break
our release flow.

Reviewed By: nikoant

Differential Revision: D24647691

fbshipit-source-id: c5e89dcf0a9063e86baf44e6d25164884a1a2b1e
2020-11-05 05:17:29 -08:00
Pascal Hartig
7293a7ff55 Move public build infra entirely to GitHub
Summary:
As part of our release confidence effort, this replaces the flaky internal task that creates the tag, promotes it to a release and uploads the artifacts to it.

Instead, we do all this in one lengthy GitHub Action. There seems to be some duplication here but this is because of the unfortunate restriction GitHub Actions imposes to avoid recursive Actions. I.e. we cannot create a tag/release and have another, independent Action pick up from there to do the building and releasing.

The `passy/` references were necessary because existing Actions didn't quite what we wanted to:

- `tag-version-commit` expected the title of the commit to match the precise tag to create. However, we want to use a regex to *extract* from the "Flipper Release: vA.B.C". My fork allows specifying a grouping regex for that.
- `github-upload-release-artifacts-action` relied on being triggered by a tag. As described above, that's not possible with this setup. Instead, this takes an existing tag and attaches to it.

Reviewed By: nikoant

Differential Revision: D24627518

fbshipit-source-id: 8121df6aa7bd36bda28e0d3cb207a002cd127647
2020-11-05 05:17:29 -08:00