1name: Create DokuWiki Plugin ZIP and Changelog on Tag 2 3on: 4 push: 5 tags: 6 - 'v*' 7 8jobs: 9 build-release: 10 name: Build and Release 11 runs-on: ubuntu-latest 12 13 steps: 14 - name: Checkout code 15 uses: actions/checkout@v4 16 17 - name: Set up git config 18 run: | 19 git config --global user.name "GitHub Actions" 20 git config --global user.email "actions@github.com" 21 22 - name: Install git-cliff 23 run: | 24 curl -sSL https://github.com/orhun/git-cliff/releases/download/v1.3.0/git-cliff-1.3.0-x86_64-unknown-linux-gnu.tar.gz | tar -xz 25 sudo mv git-cliff /usr/local/bin/ 26 27 - name: Generate CHANGELOG.md from commits 28 run: git-cliff -o CHANGELOG.md 29 30 - name: Create plugin zip 31 run: | 32 mkdir -p build 33 zip -r build/pagecss.zip \ 34 action.php \ 35 plugin.info.txt \ 36 syntax.php \ 37 conf/ \ 38 lang/ 39 40 cp CHANGELOG.md build/ 41 42 - name: Create GitHub Release and upload assets 43 uses: softprops/action-gh-release@v2 44 with: 45 tag_name: ${{ github.ref_name }} 46 name: Release ${{ github.ref_name }} 47 body_path: build/CHANGELOG.md 48 files: | 49 build/pagecss.zip 50 build/CHANGELOG.md 51 env: 52 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 53