diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..47aca45 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Tag Release + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + if: "! contains(github.event.head_commit.message, '[skip ci]')" + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Install pnpm + run: npm install -g pnpm + + - name: Install dependencies, build and tag. + run: | + pnpm install + composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs + pnpm run deploy + pnpm run release + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} diff --git a/.github/workflows/wporg-release.yml b/.github/workflows/wporg-release.yml new file mode 100644 index 0000000..2c60506 --- /dev/null +++ b/.github/workflows/wporg-release.yml @@ -0,0 +1,38 @@ +name: Deploy to WordPress.org + +on: + workflow_dispatch: +# push: +# tags: +# - "*" + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Install pnpm + run: npm install -g pnpm + + - name: Install dependencies, build and tag. + run: | + pnpm install + composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs + pnpm run deploy + + - name: WordPress Theme Deploy + uses: Codeinwp/action-wordpress-theme-deploy@v1.0 + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USER }} + BUILD_DIR: 'deploy/jadro' + + diff --git a/.release-it.json b/.release-it.json index c6305de..d66ea40 100644 --- a/.release-it.json +++ b/.release-it.json @@ -1,12 +1,29 @@ { - "github": { - "release": true, + "github": { + "release": true, "draft": false, "changelog": false, - "releaseName": "${version}", + "releaseName": "${version}", "assets": ["deploy/*.zip"] - }, + }, + "git": { + "requireCleanWorkingDir": false, + "tagName": "v${version}", + "commitMessage": "Release v${version}", + "pushRepo": "origin", + "push": true + }, + "npm": { + "publish": false + }, "hooks": { "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}." + }, + "plugins": { + "version": { + "src": "package.json", + "type": "json", + "path": "version" + } } }