Release etherpad #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| permissions: | |
| contents: read | |
| name: Release etherpad | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release_type: | |
| description: 'Choose the type of release to create' | |
| required: true | |
| default: 'patch' | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| env: | |
| PNPM_HOME: ~/.pnpm-store | |
| jobs: | |
| releases: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: ether/etherpad-lite | |
| path: etherpad | |
| token: '${{ secrets.ETHER_RELEASE_TOKEN }}' | |
| fetch-depth: '0' | |
| fetch-tags: 'true' | |
| - name: Checkout master | |
| working-directory: etherpad | |
| run: | | |
| git fetch origin master | |
| git checkout master | |
| git reset --hard origin/master | |
| - name: Checkout develop | |
| working-directory: etherpad | |
| run: | | |
| git fetch origin develop | |
| git checkout develop | |
| git reset --hard origin/develop | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: ether/ether.github.com | |
| path: ether.github.com | |
| token: '${{ secrets.ETHER_RELEASE_TOKEN }}' | |
| - uses: actions/cache@v5 | |
| name: Cache pnpm store | |
| with: | |
| path: ${{ env.PNPM_HOME }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - uses: pnpm/action-setup@v6 | |
| name: Install pnpm | |
| with: | |
| version: 10.33.2 | |
| run_install: false | |
| - name: Install dependencies ether.github.com | |
| run: pnpm install --frozen-lockfile | |
| working-directory: ether.github.com | |
| - name: Set git user | |
| run: | | |
| git config --global user.name "Etherpad Release Bot" | |
| git config --global user.email "noreply@etherpad.org" | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 2.7 | |
| - uses: reitzig/actions-asciidoctor@v2.0.4 | |
| with: | |
| version: 2.0.18 | |
| - name: Prepare release | |
| working-directory: etherpad | |
| run: | | |
| cd bin | |
| pnpm install | |
| pnpm run release ${{ inputs.release_type }} | |
| - name: Push after release | |
| working-directory: etherpad | |
| run: | | |
| ./bin/push-after-release.sh |