Skip to content

Commit

Permalink
Merge pull request #136 from OpenConext/feature/tag-release-gha
Browse files Browse the repository at this point in the history
Add tag release Github Actions workflow
  • Loading branch information
MKodde authored Feb 8, 2022
2 parents a15f1ed + 236a5e3 commit 38cfedc
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 2 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
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 }}
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
"!/.env.local.php",
"!/var/cache/prod",
"!/public/build",
"public/scss",
"public/typescript",
"/node_modules",
"/dev",
"/translations/sp",
Expand All @@ -168,7 +170,12 @@
"/node_modules",
"/coverage",
"/homestead",
"/build"
"/build",
"/.github",
"/docs",
".gitignore",
".travis.*",
"behat.yml"
]
}
}
2 changes: 1 addition & 1 deletion homestead/Homestead.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ sites:
to: /home/vagrant/code/archive/public
type: symfony4
php: '7.2'
name: tiqr
name: tiqr-homestead
hostname: tiqr

0 comments on commit 38cfedc

Please sign in to comment.