moodlehq / moodle-plugin-release

Template for GitHub Actions YAML file allowing to automatically release tagged version in the Moodle Plugins directory
GNU General Public License v3.0
13 stars 4 forks source link

Make release workflow a custom GH action #12

Open kabalin opened 1 month ago

kabalin commented 1 month ago

It would be more convenient to use this a custom action, e.g.

on:
  push:
    tags:
      - v*

jobs:
  release-at-moodle-org:
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v4
      - name: Releasing in the Plugins directory
        uses: moodlehq/moodle-plugin-release@v1
        with:
          token: ${{ secrets.MOODLE_ORG_TOKEN }}

Guide on creating custom action and examples are in docs.

kabalin commented 1 month ago

Also for reference, see https://github.com/catalyst/catalyst-moodle-workflows/blob/main/.github/plugin/release/action.yml, it does the same already, but not formatted as action, as it is supposed to be run as part of CI workflow.