mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-18 11:34:05 -08:00
4bcf8331a7
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.5 to 3.0.8. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3.0.5...v3.0.8) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
name: ui_build_and_release
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "v0.[0-9]+.[0-9]+*"
|
|
jobs:
|
|
release:
|
|
name: release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Install nodejs
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: "web/ui/.nvmrc"
|
|
registry-url: "https://registry.npmjs.org"
|
|
- uses: actions/cache@v3.0.8
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: Check libraries version
|
|
## This step is verifying that the version of each package is matching the tag
|
|
if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'v') }}
|
|
run: ./scripts/ui_release.sh --check-package "${{ github.ref_name }}"
|
|
- name: build
|
|
run: make assets
|
|
- name: Copy files before publishing libs
|
|
run: ./scripts/ui_release.sh --copy
|
|
- name: Publish dry-run libraries
|
|
if: ${{ github.event_name == 'pull_request' || github.ref_name == 'main' }}
|
|
run: ./scripts/ui_release.sh --publish dry-run
|
|
- name: Publish libraries
|
|
if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'v') }}
|
|
run: ./scripts/ui_release.sh --publish
|
|
env:
|
|
# The setup-node action writes an .npmrc file with this env variable
|
|
# as the placeholder for the auth token
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|