Merge branch 'develop' #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- '*.*.*' | |
name: Create Github Release | |
permissions: | |
contents: write | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Make build dir | |
run: | | |
mkdir -p build | |
- name: Build assets | |
run: | | |
docker network create frontend | |
docker compose run --rm node yarn install | |
docker compose run --rm node yarn build | |
- name: Create release file | |
run: | | |
rm build/example_release.json | |
printf "{\n \"releaseTimestamp\": $(date +%s),\n \"releaseTime\": \"$(date)\",\n \"releaseVersion\": \"${{ github.ref_name }}\"\n}" > build/release.json | |
cat build/release.json | |
- name: Rename build dir | |
# Make archive directory name match expected build "homepage": "/admin/", | |
run: | | |
mv build/ admin | |
- name: Make artefacts dir | |
run: | | |
mkdir -p ../assets | |
- name: Create archive | |
run: | | |
tar \ | |
-zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz admin/* | |
- name: Create checksum | |
run: sha256sum ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt | |
- name: Create a release in GitHub and uploads assets | |
run: | | |
gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.* | |
env: | |
GITHUB_TOKEN: ${{ github.TOKEN }} | |
shell: bash |