Skip to content

Fix Stompy's Arrival Date (June 2021) (#71) #31

Fix Stompy's Arrival Date (June 2021) (#71)

Fix Stompy's Arrival Date (June 2021) (#71) #31

Workflow file for this run

name: Tag
on:
push:
branches:
- main
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
sparse-checkout: package.json
- name: Check version
id: version
run: |
set -e -o pipefail
BEFORE_VERSION=$(git show "${{ github.event.before }}:package.json" | jq -r .version)
AFTER_VERSION=$(git show "${{ github.event.after }}:package.json" | jq -r .version)
if [ "$BEFORE_VERSION" != "$AFTER_VERSION" ]; then
echo "Version changed from $BEFORE_VERSION to $AFTER_VERSION"
echo "version=$AFTER_VERSION" >> "$GITHUB_OUTPUT"
fi
- name: Tag version
if: ${{ steps.version.outputs.version }}
run: |
set -e -o pipefail
git tag "${{ steps.version.outputs.version }}" "${{ github.event.after }}"
git push origin "${{ steps.version.outputs.version }}"