|
15 | 15 | type: string
|
16 | 16 |
|
17 | 17 | jobs:
|
| 18 | + |
| 19 | + get_dry_release_versions: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + env: |
| 22 | + GITHUB_TOKEN: ${{ github.event.inputs.token }} |
| 23 | + outputs: |
| 24 | + current_version: ${{ steps.get_versions.outputs.current_version }} |
| 25 | + next_version: ${{ steps.get_versions.outputs.next_version }} |
| 26 | + steps: |
| 27 | + - name: Checkout |
| 28 | + uses: actions/checkout@v2 |
| 29 | + with: |
| 30 | + persist-credentials: false |
| 31 | + - name: Setup Node.js |
| 32 | + uses: actions/setup-node@v2 |
| 33 | + with: |
| 34 | + node-version: '16' |
| 35 | + - name: Release (Dry Run) |
| 36 | + id: get_versions |
| 37 | + run: | |
| 38 | + CURRENT_VERSION=$(npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release --dry-run | grep "associated with version " | sed -E 's/.* version//' | sed -E 's/ on.*//') |
| 39 | + NEXT_VERSION=$(npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release --dry-run | grep 'The next release version is' | sed -E 's/.* ([[:digit:].]+)$/\1/') |
| 40 | + echo ::set-output name=current_version::$CURRENT_VERSION |
| 41 | + echo ::set-output name=next_version::$NEXT_VERSION |
| 42 | + echo "Current version is ${CURRENT_VERSION}" |
| 43 | + echo "Next version is ${NEXT_VERSION}" |
| 44 | +
|
| 45 | + publish-web-ui-npm: |
| 46 | + if: github.repository == 'feast-dev/feast' |
| 47 | + needs: get_dry_release_versions |
| 48 | + runs-on: ubuntu-latest |
| 49 | + env: |
| 50 | + # This publish is working using an NPM automation token to bypass 2FA |
| 51 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 52 | + CURRENT_VERSION: ${{ needs.get_dry_release_versions.outputs.current_version }} |
| 53 | + NEXT_VERSION: ${{ needs.get_dry_release_versions.outputs.next_version }} |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v2 |
| 56 | + - uses: actions/setup-node@v2 |
| 57 | + with: |
| 58 | + node-version: '17.x' |
| 59 | + registry-url: 'https://registry.npmjs.org' |
| 60 | + - name: Bump file versions (temporarily for Web UI publish) |
| 61 | + run: python ./infra/scripts/release/bump_file_versions.py ${CURRENT_VERSION} ${NEXT_VERSION} |
| 62 | + - name: Install yarn dependencies |
| 63 | + working-directory: ./ui |
| 64 | + run: yarn install |
| 65 | + - name: Build yarn rollup |
| 66 | + working-directory: ./ui |
| 67 | + run: yarn build:lib |
| 68 | + - name: Publish UI package |
| 69 | + working-directory: ./ui |
| 70 | + run: npm publish |
| 71 | + env: |
| 72 | + # This publish is working using an NPM automation token to bypass 2FA |
| 73 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 74 | + |
18 | 75 | release:
|
19 | 76 | name: release
|
20 | 77 | runs-on: ubuntu-latest
|
|
0 commit comments