-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into monter82/mc-fix
- Loading branch information
Showing
5 changed files
with
64 additions
and
67 deletions.
There are no files selected for viewing
This file contains 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 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,38 @@ | ||
name: Check Package Version in PR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'packages/snap/src/**' | ||
|
||
jobs: | ||
check_version: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: 'create-main-branch' | ||
run: 'git branch --track main origin/main' | ||
|
||
- name: Get version from main branch | ||
id: get_version_main | ||
run: echo "::set-output name=version::$(git show HEAD~1:package.json | grep '"version":' | cut -d '"' -f 4)" | ||
|
||
- name: Get version from PR branch | ||
id: get_version_pr | ||
run: echo "::set-output name=version::$(grep '"version":' package.json | cut -d '"' -f 4)" | ||
|
||
- name: Compare versions and prevent merging if the same | ||
run: | | ||
if [ "${{ steps.get_version_main.outputs.version }}" == "${{ steps.get_version_pr.outputs.version }}" ]; then | ||
echo "Error: Versions in main branch and PR are the same - please upgrade version in PR." | ||
exit 1 | ||
else | ||
echo "Versions are different, allowing merge" | ||
echo "::set-output name=version_changed::true" | ||
fi |
This file contains 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,18 @@ | ||
name: 'NPM Publish' | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
NPM-Publish: | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
uses: celo-org/reusable-workflows/.github/workflows/npm-publish.yaml@v1.11.1 | ||
with: | ||
node-version: 16 | ||
package-dir: 'packages/snap' | ||
akeyless-api-gateway: https://api.gateway.akeyless.celo-networks-dev.org | ||
akeyless-github-access-id: p-kf9vjzruht6l | ||
akeyless-token-path: /static-secrets/apps-tooling-circle/npm-publish-token |
This file was deleted.
Oops, something went wrong.
This file contains 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