Skip to content

Fix issue with npm publish workflows #4790

Closed
@jsjoeio

Description

@jsjoeio

@code-asher pointed out a bug with our npm publish. Based on the way download_artifact works in our lib.sh script, it always grabs the binary based on the latest release branch (i.e. v4.0.1). This means we've been publishing PR builds and beta builds using the same binary as latest 🤦‍♂️

Solution

We're going to fix this by moving the workflows into one job and moving the switch logic into the bash script. We arrived at this decision because it's the best solution given the way download_artifact works and how we utilize GitHub artifacts.

TODOs

  • combine npm workflows into one job in ci.yaml
  • add logic to bash script publish-npm to check which values to use based on environment variables in job
  • modify download_artifact to take an argument
  • make diagram that shows each of the different scenarios ("staging", "dev" and "production")

Resources

Notes

ENVIRONMENT: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && "production" || "staging" }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
GITHUB_EVENT_NAME
GITHUB_REF

Read here for default envs: https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghigh-priorityThis issue needs to be resolved ASAP

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions