Skip to content

Commit

Permalink
rename "release" to "remote-publish" to avoid ambiguity with GitHub R…
Browse files Browse the repository at this point in the history
…eleases
  • Loading branch information
dherman committed Jan 8, 2024
1 parent 684e697 commit 53c8410
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions pkgs/create-neon/data/templates/ci/github/publish.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ run-name: |
{{#$}}
(github.event_name == 'workflow_dispatch' && inputs.dryrun && 'Dry run') ||
(github.event_name == 'workflow_dispatch' &&
format('Tag and release: {0}',
(inputs.releaseType == 'custom' && inputs.custom) || inputs.releaseType)
format('Trigger publish: {0}',
(inputs.bumpType == 'custom' && inputs.custom) || inputs.bumpType)
) ||
format('Publish: {0}', github.event.head_commit.message)
{{/$}}
Expand All @@ -27,8 +27,8 @@ on:
required: false
type: boolean
default: true
releaseType:
description: 'Release type (or custom to specify)'
bumpType:
description: 'Version bump type (or custom to specify)'
required: true
default: 'patch'
type: choice
Expand Down Expand Up @@ -60,10 +60,10 @@ jobs:
Linux: {{#$}} steps.matrix.outputs.Linux {{/$}}
steps:
- name: Validate Workflow Inputs
if: {{#$}} inputs.releaseType == 'custom' && inputs.custom == '' {{/$}}
if: {{#$}} inputs.bumpType == 'custom' && inputs.custom == '' {{/$}}
shell: bash
run: |
echo '::error::Missing release version number'
echo '::error::No custom version number provided'
exit 1
- id: action
name: Determine Action Type
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
fi
if [[ $action = tag ]] && [[ -z $TAG_TOKEN ]]; then
echo "::error::Secret TAG_TOKEN is not defined for this GitHub repo."
echo "::error::To push a release tag, this action requires:"
echo "::error::To push a publish tag, this action requires:"
echo "::error:: • a GitHub Personal Access Token;"
echo "::error:: • with Read-Write access to this repo;"
echo "::error:: • stored as a repo secret named TAG_TOKEN."
Expand Down Expand Up @@ -126,14 +126,14 @@ jobs:
shell: bash
run: npm ci
working-directory: ./pkgs/cargo-messages
- name: Trigger Release (manual only)
- name: Remote Publish (manual only)
if: {{#$}} steps.action.outputs.type == 'tag' {{/$}}
shell: bash
run: |
git checkout {{#$}} steps.branch.outputs.branch {{/$}}
git config --global user.name {{#$}} env.ACTIONS_USER {{/$}}
git config --global user.email {{#$}} env.ACTIONS_EMAIL {{/$}}
npm run release -- '{{#$}} (inputs.releaseType == 'custom' && inputs.custom) || inputs.releaseType {{/$}}'
npm run remote-publish -- '{{#$}} (inputs.bumpType == 'custom' && inputs.custom) || inputs.bumpType {{/$}}'
- name: Compute Platform Matrix
id: matrix
shell: bash
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
git checkout {{#$}} needs.setup.outputs.branch {{/$}}
git config --global user.name {{#$}} env.ACTIONS_USER {{/$}}
git config --global user.email {{#$}} env.ACTIONS_EMAIL {{/$}}
npm version '{{#$}} (inputs.releaseType == 'custom' && inputs.custom) || inputs.releaseType {{/$}}' -m "[dryrun] v%s"
npm version '{{#$}} (inputs.bumpType == 'custom' && inputs.custom) || inputs.bumpType {{/$}}' -m "[dryrun] v%s"
- name: Build
uses: neon-actions/build@{{versions.actions.neonBuild}}
with:
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
git checkout {{#$}} needs.setup.outputs.branch {{/$}}
git config --global user.name {{#$}} env.ACTIONS_USER {{/$}}
git config --global user.email {{#$}} env.ACTIONS_EMAIL {{/$}}
npm version '{{#$}} (inputs.releaseType == 'custom' && inputs.custom) || inputs.releaseType {{/$}}' -m "[dryrun] v%s"
npm version '{{#$}} (inputs.bumpType == 'custom' && inputs.custom) || inputs.bumpType {{/$}}' -m "[dryrun] v%s"
- name: Build
uses: neon-actions/build@{{versions.actions.neonBuild}}
with:
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
git checkout {{#$}} needs.setup.outputs.branch {{/$}}
git config --global user.name {{#$}} env.ACTIONS_USER {{/$}}
git config --global user.email {{#$}} env.ACTIONS_EMAIL {{/$}}
npm version '{{#$}} (inputs.releaseType == 'custom' && inputs.custom) || inputs.releaseType {{/$}}' -m "[dryrun] v%s"
npm version '{{#$}} (inputs.bumpType == 'custom' && inputs.custom) || inputs.bumpType {{/$}}' -m "[dryrun] v%s"
- name: Build
uses: neon-actions/build@{{versions.actions.neonBuild}}
with:
Expand Down
4 changes: 2 additions & 2 deletions pkgs/create-neon/data/templates/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"cross": "npm run cross-build -- --release"{{#if package.isLibrary}},
"prepack": "neon update-platforms",
"version": "neon bump --binaries platforms && git add .",
"release": "npm version -m 'v%s'",
"postrelease": "git push --follow-tags",
"remote-publish": "npm version -m 'v%s'",
"postremote-publish": "git push --follow-tags",
"dryrun": "gh workflow run publish.yml -f dryrun=true"{{/if}}
},
"devDependencies": {
Expand Down

0 comments on commit 53c8410

Please sign in to comment.