diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..0d27c93 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release zip package + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build zip + run: | + VERSION="${GITHUB_REF_NAME}" + ZIP="SharePoint_ToolBox_${VERSION}.zip" + zip -r "$ZIP" \ + Sharepoint_ToolBox.ps1 \ + lang/ \ + echo "ZIP=$ZIP" >> "$GITHUB_ENV" + echo "VERSION=$VERSION" >> "$GITHUB_ENV" + + - name: Create release and upload asset + uses: https://gitea.com/actions/gitea-release-action@latest + with: + token: ${{ secrets.RELEASE_TOKEN }} + tag_name: ${{ env.VERSION }} + release_name: "SharePoint ToolBox ${{ env.VERSION }}" + body: | + ## SharePoint ToolBox ${{ env.VERSION }} + + ### Installation + 1. Télécharger et extraire le zip + 2. Lancer `Sharepoint_ToolBox.ps1` avec PowerShell + 3. Prérequis : module `PnP.PowerShell` (`Install-Module PnP.PowerShell`) + files: ${{ env.ZIP }}