File tree Expand file tree Collapse file tree 4 files changed +71
-0
lines changed
Expand file tree Collapse file tree 4 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ /.wordpress-org
2+ /.git
3+ /.github
4+ /node_modules
5+
6+ .distignore
7+ .gitignore
8+ .gitattributes
Original file line number Diff line number Diff line change 1+ # Directories
2+ /.wordpress-org export-ignore
3+ /.github export-ignore
4+
5+ # Files
6+ /.gitattributes export-ignore
7+ /.gitignore export-ignore
Original file line number Diff line number Diff line change 1+ name : Deploy to WordPress.org
2+
3+ on :
4+ push :
5+ tags :
6+ - " *"
7+
8+ jobs :
9+ tag :
10+ name : New tag
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v3
14+ - name : Install SVN (Subversion)
15+ run : |
16+ sudo apt-get update
17+ sudo apt-get install subversion
18+
19+ - name : WordPress Plugin Deploy
20+ id : deploy
21+ uses : 10up/action-wordpress-plugin-deploy@stable
22+ with :
23+ generate-zip : true
24+
25+ - name : Find Readme File
26+ id : find_readme
27+ run : |
28+ for file in README.txt README.md Readme.txt Readme.md readme.txt readme.md; do
29+ if [ -f "$file" ]; then
30+ echo "::set-output name=readme_file::$file"
31+ break
32+ fi
33+ done
34+
35+ - name : Extract Release Notes
36+ id : release_notes
37+ run : |
38+ if [[ -z "${{ steps.find_readme.outputs.readme_file }}" ]]; then
39+ echo "::error::Readme file not found."
40+ exit 1
41+ fi
42+
43+ release_notes=$(grep '== Changelog ==' "${{ steps.find_readme.outputs.readme_file }}" | head -n -1 | tail -n +2)
44+ echo "::set-output name=notes::$release_notes"
45+
46+ - name : Create GitHub Release
47+ uses : softprops/action-gh-release@v2
48+ with :
49+ tag_name : ${{ github.ref_name }}
50+ body : ${{ steps.release_notes.outputs.notes }}
51+ files : ${{github.workspace}}/${{ github.event.repository.name }}.zip
52+
53+ env :
54+ SVN_PASSWORD : ${{ secrets.SVN_PASSWORD }}
55+ SVN_USERNAME : ${{ secrets.SVN_USERNAME }}
56+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments