Release - Snapshot #180
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Release - Snapshot' | |
on: workflow_dispatch | |
jobs: | |
test: | |
uses: './.github/workflows/test.yml' | |
with: | |
reportCoverage: false | |
build-and-release: | |
needs: ['test'] | |
runs-on: ubuntu-latest | |
environment: | |
name: 'npm' | |
url: 'https://www.npmjs.com/package/@ui5/webcomponents-react' | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
fetch-depth: 0 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4.0.3 | |
with: | |
node-version-file: '.nvmrc' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install and build | |
run: | | |
npm install -g npm | |
yarn install | |
yarn build | |
- name: publish | |
run: | | |
git config user.email ${{ secrets.BOT_GIT_EMAIL }} | |
git config user.name ${{ secrets.BOT_GIT_USERNAME }} | |
git_hash=$(git rev-parse --short "$GITHUB_SHA") | |
current_branch=$(node -p -e "'${{ github.ref }}'.replace('refs/heads/', '')") | |
${GITHUB_WORKSPACE}/node_modules/.bin/lerna publish "0.0.0-${git_hash}" \ | |
--exact \ | |
--no-push \ | |
--no-git-tag-version \ | |
--pre-dist-tag dev \ | |
--allow-branch ${current_branch} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
NPM_CONFIG_PROVENANCE: true |