mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-17 01:17:29 +02:00
Fix workflows
This commit is contained in:
parent
7e4f969f36
commit
f4f0ed00fc
25
.github/workflows/build_frontend_prs.yml
vendored
Normal file
25
.github/workflows/build_frontend_prs.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Node.js CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- frontend/**
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: frontend
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [14.x]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- run: yarn install --frozen-lockfile
|
||||||
|
- run: yarn run test
|
||||||
|
- run: yarn run fmt:check
|
11
.github/workflows/release.yaml
vendored
11
.github/workflows/release.yaml
vendored
@ -28,3 +28,14 @@ jobs:
|
|||||||
npm publish --tag ${TAG:-latest}
|
npm publish --tag ${TAG:-latest}
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
- uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
|
||||||
|
- name: Get the version
|
||||||
|
id: get_version
|
||||||
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||||
|
- name: Publish static assets to S3
|
||||||
|
run: |
|
||||||
|
aws s3 cp frontend/build s3://getunleash-static/unleash/${{ steps.get_version.outputs.VERSION }} --recursive
|
||||||
|
1
frontend/.github/stale.yml
vendored
1
frontend/.github/stale.yml
vendored
@ -1 +0,0 @@
|
|||||||
_extends: .github
|
|
14
frontend/.github/workflows/add-to-project.yml
vendored
14
frontend/.github/workflows/add-to-project.yml
vendored
@ -1,14 +0,0 @@
|
|||||||
name: Add new item to project board
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
pull_request_target:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
add-to-project:
|
|
||||||
uses: unleash/.github/.github/workflows/add-item-to-project.yml@main
|
|
||||||
secrets: inherit
|
|
40
frontend/.github/workflows/release.yml
vendored
40
frontend/.github/workflows/release.yml
vendored
@ -1,40 +0,0 @@
|
|||||||
name: 'Release unleash-frontend'
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [14.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Publish to npm
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
- run: |
|
|
||||||
yarn install --frozen-lockfile
|
|
||||||
- run: |
|
|
||||||
TAG=$(echo $GITHUB_REF_NAME | grep -oP '^v\d+\.\d+\.\d+-?\K(\w+)?')
|
|
||||||
npm publish --tag ${TAG:-latest}
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
- uses: aws-actions/configure-aws-credentials@v1
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
|
|
||||||
- name: Get the version
|
|
||||||
id: get_version
|
|
||||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
||||||
- name: Publish static assets to S3
|
|
||||||
run: |
|
|
||||||
aws s3 cp build/ s3://getunleash-static/unleash/${{ steps.get_version.outputs.VERSION }} --recursive
|
|
27
frontend/.github/workflows/release_changelog.yml
vendored
27
frontend/.github/workflows/release_changelog.yml
vendored
@ -1,27 +0,0 @@
|
|||||||
name: 'Release changelog'
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Build changelog
|
|
||||||
id: github_release
|
|
||||||
uses: metcalfc/changelog-generator@v3.0.0
|
|
||||||
with:
|
|
||||||
myToken: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Create release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: ${{ github.ref }}
|
|
||||||
body: ${{ steps.github_release.outputs.changelog }}
|
|
||||||
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
|
|
@ -40,7 +40,7 @@
|
|||||||
"build": "yarn build:frontend && yarn build:backend",
|
"build": "yarn build:frontend && yarn build:backend",
|
||||||
"build:backend": "yarn run copy-templates && tsc --pretty",
|
"build:backend": "yarn run copy-templates && tsc --pretty",
|
||||||
"build:frontend": "cd frontend && yarn build",
|
"build:frontend": "cd frontend && yarn build",
|
||||||
"prepare": "node scripts/husky-install && yarn run build && yarn build:frontend",
|
"prepare": "node scripts/husky-install && yarn run build",
|
||||||
"test": "NODE_ENV=test PORT=4243 jest",
|
"test": "NODE_ENV=test PORT=4243 jest",
|
||||||
"test:unit": "NODE_ENV=test PORT=4243 jest --testPathIgnorePatterns=src/test/e2e/**",
|
"test:unit": "NODE_ENV=test PORT=4243 jest --testPathIgnorePatterns=src/test/e2e/**",
|
||||||
"test:docker": "./scripts/docker-postgres.sh",
|
"test:docker": "./scripts/docker-postgres.sh",
|
||||||
|
Loading…
Reference in New Issue
Block a user