From 6d9f4cc97f00c308969724ceb9615d8b94605ede Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Tue, 8 Aug 2023 00:34:19 +0100 Subject: [PATCH 1/3] Add workflow to create tags on version changes --- .github/workflows/tag.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000..02802b8 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,39 @@ +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 }}" From 18c80289f5d89cd2bbdebc6ff4517aa14c26b0ab Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Tue, 8 Aug 2023 00:34:31 +0100 Subject: [PATCH 2/3] Update README to install specific version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9ce6745..c5da20a 100644 --- a/README.md +++ b/README.md @@ -26,5 +26,5 @@ pull request. Once the pull request is merged, update the GitHub-based dependency in the website and extension: -- Website: `cd apps/website && pnpm remove @alveusgg/data && pnpm add github:alveusgg/data` -- Extension: `npm install github:alveusgg/data` +- Website: `cd apps/website && pnpm add github:alveusgg/data#` +- Extension: `npm install github:alveusgg/data#` From 3091a35c002e37a6b75b2a766b5fe297094d62c8 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Tue, 8 Aug 2023 00:34:43 +0100 Subject: [PATCH 3/3] Bump version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 57431a9..c88f6a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@alveusgg/data", - "version": "0.18.0", + "version": "0.18.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@alveusgg/data", - "version": "0.18.0", + "version": "0.18.1", "license": "SEE LICENSE IN LICENSE.md", "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.2.0", diff --git a/package.json b/package.json index 58e9c3d..aa36842 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alveusgg/data", - "version": "0.18.0", + "version": "0.18.1", "private": true, "license": "SEE LICENSE IN LICENSE.md", "repository": {