Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Update release workflow to deploy to wordpress.org (#49)
Browse files Browse the repository at this point in the history
* Update release workflow to deploy to wordpress.org

* Removed print version notes step
  • Loading branch information
pedromcp90 authored Jan 9, 2023
1 parent 97c98fe commit b23497d
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,25 @@ jobs:
run: |
npm install --include=dev
npm run build
- name: Get version
id: get-version
- name: Get release notes
id: get-release-notes
run: |
version=`gawk 'match($0, /Version: (.*)/, ary) {print ary[1]}' doofinder/readme.txt`
changelog_line=`grep -n "= ${version} =" doofinder/readme.txt | cut -f1 -d:`
((changelog_line++))
version_notes=`awk "NR==$changelog_line" doofinder/readme.txt`
echo "::set-output name=version_notes::$version_notes"
echo "::set-output name=version::$version"
- name: Print version notes
id: print-notes
run: |
echo "Version: ${{ steps.get-version.outputs.version }}"
echo "Version Notes: ${{ steps.get-version.outputs.version_notes }}"
# - name: Deploy to Wordpress.org SVN Repository
# id: deploy
# uses: 10up/action-wordpress-plugin-deploy@stable
# env:
# SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
# SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
# SLUG: doofinder
# BUILD_DIR: doofinder
# ASSETS_DIR: assets
release_notes=`awk "NR==$changelog_line" doofinder/readme.txt`
echo "release_notes=$release_notes" >> $GITHUB_OUTPUT
- name: Deploy to Wordpress.org SVN Repository
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: doofinder
BUILD_DIR: doofinder
ASSETS_DIR: assets
- name: Upload release asset
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.get-version.outputs.version_notes }}
body: ${{ steps.get-release-notes.outputs.release_notes }}
files: doofinder.zip
draft: true

0 comments on commit b23497d

Please sign in to comment.