-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cam18894 - ajout action pour generer le kpz a chaque push de tag
- Loading branch information
1 parent
d741054
commit a091638
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Generate KPZ file | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on new tags events but only for the "master" branch | ||
push: | ||
tags: | ||
- '*' | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
release: | ||
name: Build & Release | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Parse out and store the GitHub repository name | ||
id: myvars | ||
run: | | ||
IFS='/' read -r -a parts <<< "$GITHUB_REPOSITORY" | ||
GITHUB_REPO="${parts[1]}" | ||
echo "github_repo=$GITHUB_REPO" >> $GITHUB_OUTPUT | ||
echo "GITHUB REPO: $GITHUB_REPO" | ||
TAG_VERSION="${GITHUB_REF##*/}" | ||
echo "TAG VERSION: $TAG_VERSION" | ||
TAG_VERSION="${TAG_VERSION:1}" | ||
echo "TAG VERSION 2: $TAG_VERSION" | ||
echo "tag_version=$TAG_VERSION" >> $GITHUB_OUTPUT | ||
- name: Dump myvars outputs | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(steps.myvars.outputs) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Build Koha Plugin kpz artifact | ||
id: kpz | ||
uses: "bywatersolutions/github-action-koha-plugin-create-kpz@master" | ||
with: | ||
release-version: ${{ steps.myvars.outputs.tag_version }} | ||
release-name: ${{ steps.myvars.outputs.github_repo }} | ||
minimum-version: "22.05" | ||
plugin-module: "Koha/Plugin/UndeleteRecords.pm" | ||
|
||
- name: See if kpz was created | ||
run: | | ||
echo "FILENAME: ${{ steps.kpz.outputs.filename }}" | ||
ls -alh | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
${{ steps.kpz.outputs.filename }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |