-
Notifications
You must be signed in to change notification settings - Fork 14
feat(ipa): IPA Package config, docs and release workflow #855
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
Changes from 12 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
850499d
Draft ipa package release workflow
7b8ee1c
Added npmignore tested with npm pack
91b086f
Updated CONTRIBUTING documentation to reflect IPA package and convent…
1230f5d
fix lint errors
c62b858
fix lint error
8145b39
Draft version check bash script
af7742e
Test version checking with fake version bump
f4f3a09
remove unbound variable
7c424ce
attempt fix
7419c93
pipe version script output
27ad395
fix checkout
edcbd8e
try env variable
ddf873a
Include collection in npm package
1bd1b87
attempt lint fix
a87eec7
attempt branch fetch fix
5ef60b0
attempt lint fix
026a990
Trying to fix possible word splitting
ada8f22
Trying to fix possible word splitting
1dcd9e6
unbump version after testing, try different fix
3f757c2
update ipa release workflow to use version check script
d07e18a
more fix attempts :(
f81ef89
Refactor version bump logic
325f159
Add if to check version change status before publishing
7ce67f1
Fix output parsing
54f865b
output correction
f252db0
Removed unnecessary lines
4d20230
Update Package release checklist
61caa35
Refine package release process
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -eou pipefail | ||
|
||
current_version=$(jq -r '.version' tools/spectral/ipa/package.json) | ||
|
||
previous_version=$(git show origin/"${BASE_BRANCH}":tools/spectral/ipa/package.json | jq -r '.version') | ||
|
||
if [[ -z "$previous_version" || "$previous_version" == "null" ]]; then | ||
previous_version="none" | ||
fi | ||
|
||
if [[ "$previous_version" == "$current_version" ]]; then | ||
echo "false" | ||
wtrocki marked this conversation as resolved.
Show resolved
Hide resolved
|
||
else | ||
echo "true" | ||
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Release IPA Package | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'tools/spectral/ipa/package.json' | ||
|
||
jobs: | ||
check-version: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | ||
with: | ||
sparse-checkout: | | ||
tools/spectral/ipa | ||
- name: Check Version Bump | ||
working-directory: tools/spectral/ipa | ||
id: version_check | ||
wtrocki marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: | | ||
current_version=$(jq '.version' package.json) | ||
echo "Current version: $current_version" | ||
previous_version=$(git show origin/${{ github.event.pull_request.base.ref }}:tools/spectral/ipa/package.json | jq -r '.version') | ||
if [[ -z "$previous_version" || "$previous_version" == "null" ]]; then | ||
previous_version="none" | ||
fi | ||
echo "Previous version: $previous_version" | ||
|
||
if [[ "$previous_version" == "$current_version" ]]; then | ||
echo "No version bump to release". | ||
exit 0 | ||
fi | ||
publish: | ||
needs: check-version | ||
sphterry marked this conversation as resolved.
Show resolved
Hide resolved
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
working-directory: tools/spectral/ipa | ||
- run: npm publish --access public | ||
working-directory: tools/spectral/ipa | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.IPA_VALIDATION_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.