Merge pull request #183 from BlueprintFramework/updater-v2 #1
Workflow file for this run
This file contains hidden or 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
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "stable-*" | |
| - "beta-*" | |
| - "alpha-*" | |
| - "index-*" | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Code checkout | |
| uses: actions/checkout@v4 | |
| - name: Create release branch and bump version | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| BRANCH=release/"${REF_NAME}" | |
| git config --local user.email 'robots@blueprint.zip' | |
| git config --local user.name 'Blueprint CI' | |
| git checkout -b "$BRANCH" | |
| git push -u origin "$BRANCH" | |
| sed -i "s/VERSION=\"rolling\"/VERSION=\"${REF_NAME}\"/" blueprint.sh | |
| git add blueprint.sh | |
| git commit -m 'ci(release): bump version' | |
| git push | |
| - name: Create release archive | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| zip -r "release.zip" * .eslintrc.js .prettierignore .prettierrc.json .shellcheckrc | |
| - name: Create changelog | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| echo "[**Changelog**](https://blueprint.zip/releases/${REF_NAME})" > ./RELEASE_CHANGELOG | |
| - name: Create checksum and add to changelog | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| SUM=`sha256sum "release.zip"` | |
| echo -e "\n#### SHA256 Checksum\n\n\`\`\`\n$SUM\n\`\`\`\n" >> ./RELEASE_CHANGELOG | |
| echo "$SUM" > checksum.txt | |
| - name: Create release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| draft: true | |
| prerelease: ${{ contains(github.ref, 'rc') }} | |
| body_path: ./RELEASE_CHANGELOG | |
| files: | | |
| release.zip | |
| checksum.txt |