From 564b71951b4fa8a5018befc3205c8201ced64928 Mon Sep 17 00:00:00 2001 From: Arun Bose Date: Thu, 15 Feb 2024 11:30:32 +0530 Subject: [PATCH] sdf --- .github/workflows/cr.yml | 97 --------------------------- .github/workflows/{a.yml => test.yml} | 0 a.yml | 19 ------ 3 files changed, 116 deletions(-) delete mode 100644 .github/workflows/cr.yml rename .github/workflows/{a.yml => test.yml} (100%) delete mode 100644 a.yml diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml deleted file mode 100644 index b4c8969..0000000 --- a/.github/workflows/cr.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: 'generate experimental/dev stage draft GitHub release' -on: - push: - branches: [ main ] - -jobs: - create-release: - permissions: - contents: write - runs-on: ubuntu-latest - outputs: - release_id: ${{ steps.create-release.outputs.result }} - upload_url: ${{ steps.create-release.outputs.upload_url }} - - steps: - - uses: actions/checkout@v4 - - name: setup node - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: get version - run: | - echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV - echo "GIT_TAG_NAME=main-app-v$(node -p "require('./package.json').version")" >> $GITHUB_ENV - - name: create release - id: create-release - uses: actions/github-script@v7 - with: - script: | - const os = require("os") - const fs = require("fs") - - function setOutput(key, value) { - // Temporary hack until core actions library catches up with github new recommendations - const output = process.env['GITHUB_OUTPUT'] - fs.appendFileSync(output, `${key}=${value}${os.EOL}`) - } - const { data } = await github.rest.repos.createRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - tag_name: `${process.env.GIT_TAG_NAME}`, - target_commitish: 'main', - name: `Phoenix Code Experimental build v${process.env.PACKAGE_VERSION}`, - body: 'Take a look at the assets to download and install Phoenix Code For your platform.\n\n>UpdateNotification: ', - draft: true, - prerelease: true - }) - console.log(data); - setOutput('upload_url', data.upload_url); - return data.id - - build-linux-bins: - needs: [ create-release ] - permissions: - contents: write - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - platform: [ ubuntu-20.04, ubuntu-22.04] - - runs-on: ${{ matrix.platform }} - steps: - - name: Debug print upload_url - run: | - echo "Upload URL: ${{ needs.create-release.outputs.upload_url }}" - echo "Upload URL: ${{ needs.create-release.outputs.release_id }}" - - - uses: actions/checkout@v4 - - name: get Git Tag - shell: bash - run: echo "GIT_TAG_NAME=dev-app-v$(node -p "require('./package.json').version")" >> $GITHUB_ENV - - name: setup node - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: GLIBC version - run: | - ldd --version - - name: install frontend dependencies - run: | - tar -czvf test.tar.gz test - GLIBC_VER=$(ldd --version | head -n1 | awk '{print $NF}') - OUTPUT_FILENAME="test-needGLIBC-${GLIBC_VER}.tar.gz" - mv test.tar.gz "$OUTPUT_FILENAME" - echo "OUTPUT_FILENAME=$OUTPUT_FILENAME" >> $GITHUB_ENV - ls - - name: Upload Release Asset - uses: softprops/action-gh-release@v1 - with: - files: ${{ env.OUTPUT_FILENAME }} - tag_name: ${{ env.GIT_TAG_NAME }} - draft: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/a.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/a.yml rename to .github/workflows/test.yml diff --git a/a.yml b/a.yml deleted file mode 100644 index 3c2b6d7..0000000 --- a/a.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Publish extension to phcode.dev extension store test2 -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release -on: - release: - types: - - edited - - published - -jobs: - build-tasks: - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - id: github_context_step - run: echo '${{ toJSON(github) }}' - - name: release details - run: | - echo "$GITHUB_REF repo=${{github.event.repository.full_name}}" - curl --fail-with-body https://publish.phcode.dev/publishGithubRelease?releaseRef=${{github.event.repository.full_name}}:$GITHUB_REF