diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml new file mode 100644 index 00000000..4bffe6e8 --- /dev/null +++ b/.github/workflows/development.yml @@ -0,0 +1,28 @@ +name: Build Development RPM +on: + workflow_dispatch: + +jobs: + update_create_pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get current stable version + id: get_version + run: echo "::set-output name=version::$(cat webtop5-build/VERSION)" + - name: Get current stable version + id: get_date + run: | + export TZ=Europe/Rome + echo "::set-output name=current::$(date)" + - name: Set development version + run: echo "development-${{ steps.get_date.outputs.current }}" > webtop5-build/VERSION + - name: Create/Update pull request + uses: peter-evans/create-pull-request@v3 + with: + branch: ${{ steps.get_version.outputs.version }}-next + title: Update to upstream release ${{ steps.get_version.outputs.version }}-next + body: '' + commit-message: Update development war ${{ steps.get_date.outputs.current }} + draft: true + token: ${{ secrets.webtop_pr }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..4037db7c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Build Release RPM +on: + workflow_dispatch: + inputs: + version: + description: 'WebTop Version' + required: true + +jobs: + update_create_pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get current stable version + id: get_version + run: echo "::set-output name=version::$(cat webtop5-build/VERSION)" + - name: Set new version + run: echo "wt-${{ github.event.inputs.version }}" > webtop5-build/VERSION + - name: Create/Update pull request + uses: peter-evans/create-pull-request@v3 + with: + branch: ${{ steps.get_version.outputs.version }}-next + title: Update to upstream release wt-${{ github.event.inputs.version }} + body: '' + commit-message: Update to upstream release wt-${{ github.event.inputs.version }} + draft: false + token: ${{ secrets.webtop_pr }} diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml new file mode 100644 index 00000000..3c980c47 --- /dev/null +++ b/.github/workflows/staging.yml @@ -0,0 +1,27 @@ +name: Build Staging RPM +on: + workflow_dispatch: + inputs: + war: + description: 'WAR number' + required: true + +jobs: + update_create_pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get current stable version + id: get_version + run: echo "::set-output name=version::$(cat webtop5-build/VERSION)" + - name: Set staging version + run: echo "staging-${{ github.event.inputs.war }}" > webtop5-build/VERSION + - name: Create/Update pull request + uses: peter-evans/create-pull-request@v3 + with: + branch: ${{ steps.get_version.outputs.version }}-next + title: Update to upstream release ${{ steps.get_version.outputs.version }}-next + body: '' + commit-message: Update staging war ${{ github.event.inputs.war }} + draft: true + token: ${{ secrets.webtop_pr }}