diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1fb58ea --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,98 @@ +--- +name: Release + +on: + workflow_dispatch: + inputs: + ZNUNY_REF: + required: false + type: string + default: dev + FRAMEWORK: + required: false + type: string + default: znuny + +jobs: + Build: + name: UnitTest:MySQL + runs-on: ubuntu-22.04 # ubuntu-latest + container: debian:10-slim + env: + DB: mysql + MYSQL_USER: "${{ inputs.FRAMEWORK }}" + MYSQL_ROOT_PASSWORD: "secret" + MYSQL_PASSWORD: "secret" + MYSQL_DATABASE: "${{ inputs.FRAMEWORK }}" + services: + mariadb: + image: mariadb:10 + env: + MYSQL_USER: "${{ inputs.FRAMEWORK }}" + MYSQL_ROOT_PASSWORD: "secret" + MYSQL_PASSWORD: "secret" + MYSQL_DATABASE: "${{ inputs.FRAMEWORK }}" + steps: + - name: Check out repository code + uses: actions/checkout@v3 + env: + fetch-depth: "1" + with: + path: repository + + - name: Check out module-tools + uses: actions/checkout@v3 + env: + fetch-depth: "1" + with: + repository: znuny/module-tools + path: module-tools + + - name: Check out Znuny + uses: actions/checkout@v4 + env: + fetch-depth: "1" + with: + repository: znuny/Znuny + ref: ${{ inputs.ZNUNY_REF }} + path: znuny + + - name: Install dependencies + run: | + cd znuny + .github/workflows/ci/dependencies.sh + + - name: Setup Znuny + run: | + cd znuny + .github/workflows/ci/setup.sh + + - name: Link repository + run: | + cd "$GITHUB_WORKSPACE" + apt-get install -y libdatetime-perl libgetopt-complete-perl libio-interactive-perl libstring-similarity-perl libxmlrpc-lite-perl + + su -c "$GITHUB_WORKSPACE/module-tools/bin/${{ inputs.FRAMEWORK }}.ModuleTools.pl Module::File::Link $GITHUB_WORKSPACE/repository $GITHUB_WORKSPACE/znuny" - "${{ inputs.FRAMEWORK }}" + + cd znuny + su -c "bin/${{ inputs.FRAMEWORK }}.Console.pl Maint::Cache::Delete" - "${{ inputs.FRAMEWORK }}" + su -c "bin/${{ inputs.FRAMEWORK }}.Console.pl Maint::Config::Rebuild --cleanup" - "${{ inputs.FRAMEWORK }}" + + - name: Build Package + run: bin/${{ inputs.FRAMEWORK }}.Console.pl Dev::Package::Build ${{ github.event.repository.name }}.sopm ./ + + - uses: actions/upload-artifact@v4 + with: + name: OPM + path: "${{ github.event.repository.name }}*.opm" + + # Release: + # environment: + # name: Release + # url: "https://github.com/dennykorsukewitz/${{ github.event.repository.name }}" + # runs-on: ubuntu-latest + # needs: Build + # steps: + # - name: Deploy to GitHub Pages + # id: deployment + # uses: actions/deploy-pages@v2 diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..a216b13 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,5 @@ +# [7.0.0] + +## Migration + +- Ported to 7.0.