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

feature: add publish action #1297

Merged
merged 2 commits into from
Sep 27, 2023
Merged

feature: add publish action #1297

merged 2 commits into from
Sep 27, 2023

Conversation

yue4u
Copy link
Contributor

@yue4u yue4u commented Sep 26, 2023

#1294

Description

  • add publish action via workflow_dispatch
  • support npm provenance

@yue4u yue4u requested a review from 0b5vr September 26, 2023 07:28
Copy link
Contributor Author

@yue4u yue4u left a comment

Choose a reason for hiding this comment

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

Anyway this might not work as intended unless we merge and test it on dev branch.
Current plan is to merge this and iterate through a few canary releases.

on:
# Who has permission to workflow_dispatch
# https://github.com/orgs/community/discussions/26622
workflow_dispatch:
Copy link
Contributor Author

@yue4u yue4u Sep 26, 2023

Choose a reason for hiding this comment

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

if: contains('["..."]', github.actor) does not really make sense to me

Copy link
Contributor

Choose a reason for hiding this comment

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

workflow_dispatch is a slightly recent feature iirc; maybe they couldn't use the feature at that moment.
I agree with using workflow_dispatch 👍

# checkout is pinned to dev branch here
ref: dev
- name: Setup Node
uses: actions/setup-node@v3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

v4 use node 20 we should update CI before that

Comment on lines +40 to +42
permissions:
contents: write
id-token: write
Copy link
Contributor Author

Choose a reason for hiding this comment

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


- name: Set package version
run: |
yarn lerna version ${{ github.event.inputs.version }} --exact --no-push --yes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if we need --force-publish here

run: |
git push origin ${{ github.ref_name }}

- name: Upload Builds
Copy link
Contributor Author

@yue4u yue4u Sep 26, 2023

Choose a reason for hiding this comment

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

Not sure if we want to automate the release tag on Github. There are only 3rd party solutions for now. https://github.com/actions/create-release#github-action---releases-api

- name: Set package version
run: |
yarn lerna version ${{ github.event.inputs.version }} --exact --no-push --yes
yarn lerna publish from-git --dist-tag latest
Copy link
Contributor

Choose a reason for hiding this comment

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

it would be cool if we could make the disttag variable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

add in 42d5348

@0b5vr
Copy link
Contributor

0b5vr commented Sep 26, 2023

let's try whether it's working properly

@yue4u yue4u merged commit b3d3a61 into dev Sep 27, 2023
@yue4u yue4u deleted the feat/add-publish-action branch September 27, 2023 07:02
@0b5vr 0b5vr added this to the next milestone Oct 3, 2023
0b5vr added a commit that referenced this pull request Oct 12, 2023
Publish workflow has been introduced in #1297, ffc44d6
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.

2 participants