[Snyk] Upgrade reflect-metadata from 0.1.14 to 0.2.2 #602
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
name: Release PR | |
on: | |
pull_request: | |
branches: | |
- master | |
env: | |
V4_API_KEY_MAINNET: ${{ secrets.V4_API_KEY_MAINNET }} | |
V4_API_KEY_TESTNET: ${{ secrets.V4_API_KEY_TESTNET }} | |
V3_API_KEY_MAINNET: ${{ secrets.V3_API_KEY_MAINNET }} | |
V3_API_KEY_TESTNET: ${{ secrets.V3_API_KEY_TESTNET }} | |
NON_TATUM_RPC_ETH_URL: ${{ secrets.NON_TATUM_RPC_ETH_URL }} | |
VERBOSE: ${{ secrets.verbose }} | |
jobs: | |
checks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current | |
uses: actions/checkout@v3 | |
- name: Get state current | |
run: | | |
hash=$(sha1sum CHANGELOG.md | cut -f1 -d' ') | |
version=$(jq -r '.version' package.json) | |
echo "pr_pkg_version=$version" >> $GITHUB_ENV | |
echo "pr_changelog_hash=$hash" >> $GITHUB_ENV | |
- name: Check if release exists | |
run: | | |
curl --fail --silent --max-time 5 "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${{ env.pr_pkg_version }}" && echo "release_exists=true" >> $GITHUB_ENV || echo "release_exists=false" >> $GITHUB_ENV | |
- name: Checkout master | |
uses: actions/checkout@v3 | |
with: | |
ref: master | |
- name: Get state master | |
run: | | |
hash=$(sha1sum CHANGELOG.md | cut -f1 -d' ') | |
version=$(jq -r '.version' package.json) | |
echo "master_pkg_version=$version" >> $GITHUB_ENV | |
echo "master_changelog_hash=$hash" >> $GITHUB_ENV | |
- name: Ensure changelog updated if version changed | |
run: | | |
[ "${{ env.release_exists }}" == "false" ] && [ "${{ env.pr_changelog_hash }}" = "${{ env.master_changelog_hash }}" ] && echo "Error: no changes in changelog detected for the release" && exit 1 || exit 0 |