From df77c5075fe10c11eb134751388dc8c6ab46a421 Mon Sep 17 00:00:00 2001 From: David Mondok <3883758+davidmondok@users.noreply.github.com> Date: Tue, 10 Mar 2020 17:24:00 +0100 Subject: [PATCH] bump version, add github release workflow --- .github/workflows/release.yml | 39 ++++++++++++++++++++++++++++++++++ composer.json | 8 +++---- readme.txt | 2 +- woda-scripts-styles-loader.php | 7 +++--- 4 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..458a0dd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Get the repository name + id: get_repo_name + run: echo ::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}') + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + - name: Create Zip File + uses: thedoctor0/zip-release@master + if: startsWith(github.ref, 'refs/tags/') + with: + filename: '${{ steps.get_repo_name.outputs.REPOSITORY_NAME }}.zip' + exclusions: '*.git* + /*node_modules/* + *.lock + .editorconfig + .distignore + src + assets/src' + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: ${{ steps.get_repo_name.outputs.REPOSITORY_NAME }}.zip + name: Version ${{ steps.get_version.outputs.VERSION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/composer.json b/composer.json index 457874e..2f9cd01 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "woda/wp-scripts-styles-loader", + "name": "woda/scripts-styles-loader", "description": "", "keywords": [ "wordpress", @@ -7,7 +7,7 @@ "assets" ], "license": "GPLv2 or later", - "homepage": "https://github.com/wwwoda/wp-plugin-scripts-styles-loader", + "homepage": "https://github.com/wwwoda/woda-scripts-styles-loader", "authors": [ { "name": "Woda", @@ -25,8 +25,8 @@ ], "type": "wordpress-plugin", "support": { - "issues": "https://github.com/wwwoda/wp-plugin-scripts-styles-loader/issues", - "source": "https://github.com/wwwoda/wp-plugin-scripts-styles-loader" + "issues": "https://github.com/wwwoda/woda-scripts-styles-loader/issues", + "source": "https://github.com/wwwoda/woda-scripts-styles-loader" }, "require": { "ext-json": "*", diff --git a/readme.txt b/readme.txt index 22ffee2..0d9fe43 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: @davidmondok Tags: fonts, performance Requires at least: 4.5 Tested up to: 5.3 -Stable tag: 0.3.0 +Stable tag: 0.3.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/woda-scripts-styles-loader.php b/woda-scripts-styles-loader.php index c641176..df92c04 100644 --- a/woda-scripts-styles-loader.php +++ b/woda-scripts-styles-loader.php @@ -1,16 +1,17 @@