From 18bfe1e33b52d7dbf2862f87723a9fef9287f53c Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Mon, 31 Jan 2022 11:55:15 +0100 Subject: [PATCH 1/3] Add tag release Github Actions workflow This workflow will start a release procedure using Stepup-Build scripts. Resulting in a tarbal and shasum that is uploaded to the github release page --- .github/workflows/tag-release.yml | 63 +++++++++++++++++++++++++++++++ homestead/Homestead.yaml | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tag-release.yml diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml new file mode 100644 index 00000000..da8bec1b --- /dev/null +++ b/.github/workflows/tag-release.yml @@ -0,0 +1,63 @@ +name: tag-release +on: + push: + tags: + - "*.*.*" +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + COMPONENT_NAME: Stepup-tiqr + if: always() + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + repository: OpenConext/Stepup-Build + ref: feature/dockerize-build-scripts + - name: Output the semver tag to the tag variable + id: vars + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + - name: Run release script + run: ./stepup-build.sh ${COMPONENT_NAME} --tag ${{ steps.vars.outputs.tag }} + - name: Grab the archive filename + id: archive + run: | + echo ::set-output name=archive::$(find . -maxdepth 1 -name "$COMPONENT_NAME*.tar.bz2" -printf '%f\n') + echo ::set-output name=shasum::$(find . -maxdepth 1 -name "$COMPONENT_NAME*.sha" -printf '%f\n') + - 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: ${{ steps.archive.outputs.archive }} + asset_name: ${{ steps.archive.outputs.archive }} + asset_content_type: application/gzip + - uses: actions/upload-release-asset@v1.0.1 + name: Upload the release artefact verification shasum + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.archive.outputs.shasum }} + asset_name: ${{ steps.archive.outputs.shasum }} + 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 }} \ No newline at end of file diff --git a/homestead/Homestead.yaml b/homestead/Homestead.yaml index 4b09c835..93fd9566 100644 --- a/homestead/Homestead.yaml +++ b/homestead/Homestead.yaml @@ -22,5 +22,5 @@ sites: to: /home/vagrant/code/archive/public type: symfony4 php: '7.2' -name: tiqr +name: tiqr-homestead hostname: tiqr From 836fe8a2536bed99d60559a6cc4c9809e11dda7b Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Mon, 31 Jan 2022 11:55:15 +0100 Subject: [PATCH 2/3] Add tag release Github Actions workflow This workflow will start a release procedure using Stepup-Build scripts. Resulting in a tarbal and shasum that is uploaded to the github release page --- .github/workflows/tag-release.yml | 63 +++++++++++++++++++++++++++++++ homestead/Homestead.yaml | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tag-release.yml diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml new file mode 100644 index 00000000..a8b8d531 --- /dev/null +++ b/.github/workflows/tag-release.yml @@ -0,0 +1,63 @@ +name: tag-release +on: + push: + tags: + - "*.*.*" +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + COMPONENT_NAME: Stepup-tiqr + if: always() + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + repository: OpenConext/Stepup-Build + ref: master + - name: Output the semver tag to the tag variable + id: vars + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + - name: Run release script + run: ./stepup-build.sh ${COMPONENT_NAME} --tag ${{ steps.vars.outputs.tag }} + - name: Grab the archive filename + id: archive + run: | + echo ::set-output name=archive::$(find . -maxdepth 1 -name "$COMPONENT_NAME*.tar.bz2" -printf '%f\n') + echo ::set-output name=shasum::$(find . -maxdepth 1 -name "$COMPONENT_NAME*.sha" -printf '%f\n') + - 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: ${{ steps.archive.outputs.archive }} + asset_name: ${{ steps.archive.outputs.archive }} + asset_content_type: application/gzip + - uses: actions/upload-release-asset@v1.0.1 + name: Upload the release artefact verification shasum + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.archive.outputs.shasum }} + asset_name: ${{ steps.archive.outputs.shasum }} + 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 }} \ No newline at end of file diff --git a/homestead/Homestead.yaml b/homestead/Homestead.yaml index 4b09c835..93fd9566 100644 --- a/homestead/Homestead.yaml +++ b/homestead/Homestead.yaml @@ -22,5 +22,5 @@ sites: to: /home/vagrant/code/archive/public type: symfony4 php: '7.2' -name: tiqr +name: tiqr-homestead hostname: tiqr From 236a5e389485a85f73cb22f11a900c123957b508 Mon Sep 17 00:00:00 2001 From: Peter Havekes Date: Wed, 2 Feb 2022 11:48:28 +0100 Subject: [PATCH 3/3] Remove unneeded content from build tar --- composer.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ee2fc72b..42d8220c 100644 --- a/composer.json +++ b/composer.json @@ -143,6 +143,8 @@ "!/.env.local.php", "!/var/cache/prod", "!/public/build", + "public/scss", + "public/typescript", "/node_modules", "/dev", "/translations/sp", @@ -168,7 +170,12 @@ "/node_modules", "/coverage", "/homestead", - "/build" + "/build", + "/.github", + "/docs", + ".gitignore", + ".travis.*", + "behat.yml" ] } }