From 1ccf39846f0b02169a39444052f5805fda7ca291 Mon Sep 17 00:00:00 2001 From: Eric Wang <37554696+ericwang401@users.noreply.github.com> Date: Mon, 29 Jan 2024 23:45:02 -0600 Subject: [PATCH] Update release workflow --- .github/workflows/release.yml | 79 +++++++++---------------- ACKNOWLEDGEMENTS => ACKNOWLEDGEMENTS.md | 13 +++- 2 files changed, 37 insertions(+), 55 deletions(-) rename ACKNOWLEDGEMENTS => ACKNOWLEDGEMENTS.md (92%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab7c60a3227..440dd9099d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,85 +2,60 @@ name: Release on: push: tags: - - 'v*' + - 'v*.*.*' jobs: release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: '18.x' + node-version: 20 - - name: Create release branch and bump version + - name: Update Embedded Version String env: REF: ${{ github.ref }} run: | - BRANCH=release/${REF:10} - git config --local user.email "ci@convoypanel.com" - git config --local user.name "Convoy CI" - git checkout -b $BRANCH - git push -u origin $BRANCH sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php - git add config/app.php - git commit -m "bump version for release" - git pull - git push - - name: Build assets + - name: Build Assets run: | npm install npm run build - - name: Create release archive + - name: Create Release Archive run: | - rm -rf node_modules/ tests/ codecov.yml CONTRIBUTOR_LICENSE_AGREEMENT CODE_OF_CONDUCT.md CONTRIBUTING.md phpunit.xml phpstan.neon .env.ci docker-compose.ci.yml .styleci.yml crowdin.yml stats.html - tar -czf panel.tar.gz * .env.example .gitignore .prettierrc.json - - - name: Extract changelog + rm -rf node_modules/ \ + tests/ \ + CODE_OF_CONDUCT.md \ + CONTRIBUTOR_LICENSE_AGREEMENT \ + crowdin.yml \ + docker-compose.ci.yml \ + phpstan.neon \ + phpunit.xml + tar -czf panel.tar.gz * + + - name: Extract Changelog id: extract_changelog env: REF: ${{ github.ref }} run: | sed -n "/^## ${REF:10}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG - echo ::set-output name=version_name::`sed -nr "s/^## (${REF:10} .*)$/\1/p" CHANGELOG.md` + echo "version_name=${REF:10}" >> $GITHUB_OUTPUT - - name: Create checksum and add to changelog + - name: Create Checksum and Add to Changelog run: | SUM=`sha256sum panel.tar.gz` echo -e "\n#### SHA256 Checksum\n\n\`\`\`\n$SUM\n\`\`\`\n" >> ./RELEASE_CHANGELOG echo $SUM > checksum.txt - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.ref }} - release_name: ${{ steps.extract_changelog.outputs.version_name }} + name: ${{ steps.extract_changelog.outputs.version_name }} body_path: ./RELEASE_CHANGELOG draft: true - prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }} - - - name: Upload binary - id: upload-release-archive - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: panel.tar.gz - asset_name: panel.tar.gz - asset_content_type: application/gzip - - - name: Upload checksum - id: upload-release-checksum - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./checksum.txt - asset_name: checksum.txt - asset_content_type: text/plain + prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') || contains(github.ref, 'rc') }} + files: | + panel.tar.gz + checksum.txt \ No newline at end of file diff --git a/ACKNOWLEDGEMENTS b/ACKNOWLEDGEMENTS.md similarity index 92% rename from ACKNOWLEDGEMENTS rename to ACKNOWLEDGEMENTS.md index f9ac109df18..31d90718f86 100644 --- a/ACKNOWLEDGEMENTS +++ b/ACKNOWLEDGEMENTS.md @@ -1,4 +1,8 @@ -Package: tslib +# Acknowledgements + +## tslib + +``` /****************************************************************************** Copyright (c) Microsoft Corporation. @@ -13,10 +17,13 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ +``` + +## fakerphp/faker -Package: fakerphp/faker Translations are under the CC-BY-SA-3.0 license. https://github.com/FakerPHP/Faker -Package: caniuse-lite +## caniuse-lite + https://github.com/browserslist/caniuse-lite \ No newline at end of file