diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..be325ce42 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,12 @@ +name: release + +on: + push: + tags: + - "*.*.*" + +jobs: + build-release-and-push-container: + uses: openconext/openconext-githubactions/.github/workflows/symfony-release.yml@main + with: + component_name: "OpenConext-engineblock" diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml deleted file mode 100644 index 3ab675128..000000000 --- a/.github/workflows/tag-release.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: tag-release -on: - push: - tags: - - "*.*.*" -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 30 - env: - DOCKER_COMPOSE: docker compose -f docker-compose-tag-release.yml - if: always() - steps: - - name: Checkout - uses: actions/checkout@master - - name: Output the semver tag to the tag variable - id: vars - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - - name: Pull OpenConext build container - run: cd docker && ${DOCKER_COMPOSE} up -d - - name: Make the release files - run: cd docker && ${DOCKER_COMPOSE} exec -T openconext bash -lc 'HOME=/home/runner/work/OpenConext-engineblock ./bin/makeRelease.sh ${{ steps.vars.outputs.tag }}' - - name: Create Draft Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.vars.outputs.tag }} - release_name: ${{ steps.vars.outputs.tag }} - body: Auto generated release. Please update these release notes manually. - draft: true - prerelease: false - - uses: actions/upload-release-asset@v1.0.1 - name: Upload the release artefact tarbal - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./Releases/OpenConext-engineblock-${{ steps.vars.outputs.tag }}.tar.gz - asset_name: OpenConext-engineblock-${{ steps.vars.outputs.tag }}.tar.gz - asset_content_type: application/gzip - - uses: actions/upload-release-asset@v1.0.1 - name: Upload the release artefact verification hash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./Releases/OpenConext-engineblock-${{ steps.vars.outputs.tag }}.sha - asset_name: OpenConext-engineblock-${{ steps.vars.outputs.tag }}.sha - asset_content_type: text/plain - - uses: eregon/publish-release@v1 - name: Publish the new release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_id: ${{ steps.create_release.outputs.id }} - - after_build: - needs: build - runs-on: ubuntu-latest - steps: - - name: Trigger Docker container build - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: build-push-docker-image.yml