review comments
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 7fcd678..3fed387 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml
@@ -17,7 +17,7 @@ - name: Checkout repo uses: actions/checkout@v4 - name: Run create_release.py - run: python3 scripts/create_release.py -r ${{ inputs.lto-sha }} -a ${{ inputs.nonlto-sha }} --action + run: python3 scripts/create_release.py -r ${{ inputs.lto-sha }} -a ${{ inputs.nonlto-sha }} --gh-action - name: Create PR id: cpr uses: peter-evans/create-pull-request@v6
diff --git a/scripts/create_release.py b/scripts/create_release.py index 45c49f2..425f7d7 100755 --- a/scripts/create_release.py +++ b/scripts/create_release.py
@@ -30,7 +30,7 @@ parser.add_argument('-r', '--release-hash') parser.add_argument('-a', '--asserts-hash') parser.add_argument('-v', '--new-version') - parser.add_argument('--action', action='store_true') + parser.add_argument('--gh-action', action='store_true') options = parser.parse_args() release_info = emsdk.load_releases_info() @@ -42,14 +42,11 @@ new_version = '.'.join(str(part) for part in new_version) asserts_hash = None - is_github_runner = False if options.release_hash: new_hash = options.release_hash asserts_hash = options.asserts_hash else: new_hash = emsdk.get_emscripten_releases_tot() - if options.action: - is_github_runner = True print('Creating new release: %s -> %s' % (new_version, new_hash)) release_info['releases'][new_version] = new_hash @@ -73,7 +70,7 @@ branch_name = 'version_' + new_version - if is_github_runner: # For GitHub Actions workflows + if options.gh_action: # For GitHub Actions workflows with open(os.environ['GITHUB_ENV'], 'a') as f: f.write(f'RELEASE_VERSION={new_version}') else: # Local use