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

@W-16971261 Create publishing workflow #134

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

clayparksfdc
Copy link
Contributor

@W-16971261 Create a publishing workflow that publishes based on a new release being created. This utilizes the shared IDX secrets shared with this repository.

@Dottenpixel
Copy link
Contributor

Hi @clayparksfdc this is showing the workflow file as empty?

Copy link
Contributor

@Dottenpixel Dottenpixel left a comment

Choose a reason for hiding this comment

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

Hi @clayparksfdc, just a couple tweaks and then some suggestions around adding a trigger for pull_request. I'm happy to pair up and run through my thoughts around that.

@@ -0,0 +1,47 @@
name: Publish VSCode Extension
Copy link
Contributor

@Dottenpixel Dottenpixel Nov 8, 2024

Choose a reason for hiding this comment

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

This file should live in .github/workflows/

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't look like we have .nvmrc in CVS, so let's specify a version

Suggested change
node-version-file: '.nvmrc'
node-version: 'latest'

Comment on lines 4 to 5
release:
types: [created]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
release:
types: [created]
release:
types: [released]
pull_request:
branches: [ '**' ]

the created event type seems a little loose, whereas released will only trigger when the release is for real, not draft or prerelease.

I'm suggesting the pull_request event too in an attempt to create a dry-run/validation for creation of the VSIX file, and we would just add to the conditional in the Publish Extension step to skip is the job is run in a PR.

fi

- name: Publish Extension
if: success() && steps.package.outputs.VSIX_FILE
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if: success() && steps.package.outputs.VSIX_FILE
if: success() && steps.package.outputs.VSIX_FILE && github.event_name == 'release'

This suggestion is in conjunction with my suggestion of a pull_request trigger

@Dottenpixel Dottenpixel self-requested a review November 8, 2024 21:06
Copy link
Contributor

@Dottenpixel Dottenpixel left a comment

Choose a reason for hiding this comment

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

Good stuff, thanks @clayparksfdc ! LGTM!

@clayparksfdc clayparksfdc merged commit 43252a7 into master Nov 14, 2024
7 checks passed
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