Remove auto-bump step from share component publishing (#31006)
* Remove auto-bump step from share component publishing Avoids having to give release bot permission to commit directly to the branch for now. * Pass npm token & remove version bump param * On this step? * We have to provide a registry URL???? * Rename as it doesn't really release
This commit is contained in:
@@ -1,20 +1,11 @@
|
|||||||
name: Publish shared component npm package
|
name: Publish shared component npm package
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
version-bump:
|
|
||||||
description: The scale of the version bump required for semver compatibility
|
|
||||||
required: true
|
|
||||||
default: patch
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- patch
|
|
||||||
- minor
|
|
||||||
- major
|
|
||||||
concurrency: release
|
concurrency: release
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
name: "Release & Publish"
|
name: "Publish"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -29,21 +20,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
node-version-file: ".node-version"
|
node-version-file: ".node-version"
|
||||||
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.ELEMENT_NPM_TOKEN }}
|
||||||
|
|
||||||
- name: 🛠️ Setup
|
- name: 🛠️ Setup
|
||||||
# When running `install` it also calls the `prepare` step which generates
|
# When running `install` it also calls the `prepare` step which generates
|
||||||
# a build
|
# a build
|
||||||
run: yarn --cwd packages/shared-components install --pure-lockfile
|
run: yarn --cwd packages/shared-components install --pure-lockfile
|
||||||
|
|
||||||
- name: 👊 Bump version
|
|
||||||
run: |
|
|
||||||
cd packages/shared-components
|
|
||||||
yarn version --no-git-tag-version --${{ github.event.inputs.version-bump }}
|
|
||||||
git config --global user.name 'ElementRobot'
|
|
||||||
git config --global user.email 'releases@riot.im'
|
|
||||||
git commit -am "Shared components: ${{ github.event.inputs.version-bump }} version bump"
|
|
||||||
git push
|
|
||||||
|
|
||||||
- name: 🚀 Publish to npm
|
- name: 🚀 Publish to npm
|
||||||
working-directory: packages/shared-components
|
working-directory: packages/shared-components
|
||||||
run: npm publish --access public --provenance
|
run: npm publish --access public --provenance
|
||||||
|
|||||||
Reference in New Issue
Block a user