File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Main
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*.*.*"
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+
13+ build :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v3
18+
19+ - name : Update files with new version and changes from changelog
20+ env :
21+ TAG : ${{ github.ref_name }}
22+ run : |
23+ VERSION="$(echo $TAG | cut -c2-)"
24+ CHANGELOG=$(cat CHANGELOG.txt)
25+ sed -i "s/Version.*/Version: $VERSION/" printapp.php
26+ sed -i "s/Stable tag:.*/Stable tag: $VERSION/" readme.txt
27+ sed -i "s/== Changelog ==.*/== Changelog ==\n\n== $VERSION =\n$CHANGELOG/" readme.txt
28+
29+ - name : Merge and release latest changes into the SVN repo
30+ env :
31+ COMMIT_MSG : ${{ github.event.head_commit.message }}
32+ SVN_SECRET : ${{ secrets.WP_SVN_SECRET }}
33+ TAG : ${{ github.ref_name }}
34+ run : |
35+ cd ..
36+ mkdir pp-wp-svn
37+ svn co https://plugins.svn.wordpress.org/printapp pp-wp-svn
38+ cp print-app-wordpress/* pp-wp-svn/trunk/ -r
39+ cd pp-wp-svn
40+ VERSION="$(echo $TAG | cut -c2-)"
41+ svn cp trunk/ tags/$VERSION
42+ svn ci -m "$COMMIT_MSG" --username printapp --password $SVN_SECRET
43+
44+ - name : Commit the version updates
45+ uses : stefanzweifel/git-auto-commit-action@v4
46+ with :
47+ branch : master
48+ # - name: Just checking
49+ # run: echo
50+ # - name: Checkout
51+ # - name: Create asset
52+ # run: cd .. && zip testBump.zip testBump/* -r && cd testBump/
53+ # - name: Release
54+ # uses: softprops/action-gh-release@v1
55+ # with:
56+ # body_path: "CHANGELOG.txt"
57+ # name: "Print.App - PrestaShop 1.7.x - ${{ github.ref_name }}"
58+ # files: "../testBump.zip"
You can’t perform that action at this time.
0 commit comments