From a73e87b2c30a9878db0b013ef6f680bba73af359 Mon Sep 17 00:00:00 2001 From: Jeremy Howard Date: Thu, 18 Jul 2024 04:11:30 +1000 Subject: [PATCH 1/3] Create rel.yml --- .github/workflows/rel.yml | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/rel.yml diff --git a/.github/workflows/rel.yml b/.github/workflows/rel.yml new file mode 100644 index 0000000..87b50b3 --- /dev/null +++ b/.github/workflows/rel.yml @@ -0,0 +1,63 @@ +name: Update Fork and Create Release + +on: + workflow_dispatch: + schedule: + - cron: '15 2 * * *' + +permissions: + contents: write + pull-requests: write + +jobs: + update-and-release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Configure Git + run: | + git config user.name github-actions + git config user.email github-actions@github.com + + - name: Update fork + run: | + git remote add upstream https://github.com/gnat/css-scope-inline.git + git fetch upstream + git merge upstream/main --no-edit + git push origin main + + - name: Get package version + id: package-version + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Check if release exists + id: check_release + run: | + release_exists=$(curl -s -o /dev/null -w "%{http_code}" https://api.github.com/repos/AnswerDotAI/css-scope-inline/releases/tags/v${{ steps.package-version.outputs.version }}) + if [ $release_exists -eq 200 ]; then + echo "exists=true" >> $GITHUB_OUTPUT + else + echo "exists=false" >> $GITHUB_OUTPUT + fi + + - name: Create Release + if: steps.check_release.outputs.exists == 'false' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ steps.package-version.outputs.version }} + run: | + gh release create v$VERSION \ + --title "Release v$VERSION" \ + --notes "Release of version $VERSION + + Please refer to the [changelog](https://github.com/gnat/css-scope-inline/blob/main/CHANGELOG.md) for details." \ + --repo ${{ github.repository }} From f974b2cce6fb8c583fcc974abc68a7fcb7eca5a8 Mon Sep 17 00:00:00 2001 From: Jeremy Howard Date: Thu, 18 Jul 2024 04:29:19 +1000 Subject: [PATCH 2/3] Create package.json --- package.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..e1a6160 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "CSS Scope Inline", + "version": "0.1.0", + "description": "Scope your inline style tags in pure vanilla CSS", + "repository": { + "type": "git", + "url": "https://github.com/gnat/css-scope-inline.git" + }, + "author": "gnat", + "keywords": [ + "utility", + "dom", + "dom-manipulation", + "lob", + "locality-of-behavior", + "htmx", + "selector", + "queryselectorall", + "queryselector" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/gnat/css-scope-inline/issues" + } +} From 312c44fd5495533af84bdc837752230e0603cc67 Mon Sep 17 00:00:00 2001 From: Jeremy Howard Date: Tue, 3 Sep 2024 08:34:13 +1000 Subject: [PATCH 3/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e1a6160..97ad49d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CSS Scope Inline", - "version": "0.1.0", + "version": "0.1.1", "description": "Scope your inline style tags in pure vanilla CSS", "repository": { "type": "git",