Bump rollup from 4.21.2 to 4.22.4 #114
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
on: | |
push: | |
branches: | |
- '**' | |
name: Test | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- run: yarn install --immutable | |
- run: yarn test:types | |
- run: yarn format | |
- run: yarn lint | |
- run: git diff --exit-code | |
- run: yarn build | |
- id: detect_version_change | |
name: Detect version change | |
if: github.ref == 'refs/heads/develop' | |
run: | | |
git fetch --prune --unshallow | |
LATEST_TAG=$(git describe --tags --abbrev=0) | |
PREVIOUS_VERSION=$(git show ${LATEST_TAG}:package.json | jq -r '.version') | |
CURRENT_VERSION=$(cat package.json | jq -r '.version') | |
if [ "$PREVIOUS_VERSION" != "$CURRENT_VERSION" ]; then | |
echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION" | |
echo "VERSION_CHANGED=true" >> $GITHUB_ENV | |
echo "PACKAGE_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV | |
else | |
echo "Version did not change" | |
fi | |
- name: Tag version | |
if: env.VERSION_CHANGED == 'true' | |
run: | | |
git config user.name "$(git log -1 --pretty=format:'%an')" | |
git config user.email "$(git log -1 --pretty=format:'%ae')" | |
git tag v${PACKAGE_VERSION} | |
git push origin v${PACKAGE_VERSION} |