diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d74622d30..cebd29bbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,9 @@ name: Release Every Other Monday on: workflow_dispatch: + inputs: + VERSION_NUMBER: + type: string # Run action at 16:15 PM on Monday (UTC) # schedule: # @TODO: the schedule below is weekly. Do byweekly check. @@ -13,21 +16,12 @@ permissions: jobs: release: runs-on: ubuntu-latest + outputs: + VERSION_NUMBER: ${{ steps.git-release.outputs.VERSION_NUMBER }} steps: - - name: Generate a token - id: generate-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.APP_ID }} - private-key: ${{ secrets.APP_PEM }} - owner: ${{ github.repository_owner }} - repositories: | - veda-ui - veda-config - uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ steps.generate-token.outputs.token }} - name: git config run: | git config user.name "${GITHUB_ACTOR}" @@ -37,17 +31,29 @@ jobs: with: node-version: ${{ env.NODE }} - run: yarn - - run: yarn release --ci --verbose + - name: Release through Git + id: git-release + run: yarn release --ci --verbose env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} preview-build: runs-on: ubuntu-latest needs: "release" steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PEM }} + owner: ${{ github.repository_owner }} + repositories: | + veda-ui + veda-config - name: Repository Dispatch uses: peter-evans/repository-dispatch@v3 with: - token: ${{ steps.generate-token.outputs.token }} + token: ${{steps.generate-token.outputs.token}} repository: nasa-impact/veda-config event-type: update-version - client-payload: '{"ref": "${{ github.ref }}", "VERSION_NUMBER": "${{ env.VERSION_NUMBER }}"}' \ No newline at end of file + client-payload: '{"ref": "${{ github.ref }}", "VERSION_NUMBER": "${{ needs.release.outputs.VERSION_NUMBER || inputs.VERSION_NUMBER }}"}' \ No newline at end of file diff --git a/.release-it.json b/.release-it.json index b35a5c711..614f9164a 100644 --- a/.release-it.json +++ b/.release-it.json @@ -1,6 +1,6 @@ { "hooks": { - "after:release": "echo \"VERSION_NUMBER=v${version}\" >> \"$GITHUB_ENV\" " + "after:release": "echo \"VERSION_NUMBER=v${version}\" >> \"$GITHUB_OUTPUT\" " }, "plugins": { "@release-it/conventional-changelog": { @@ -28,4 +28,4 @@ "preRelease": false, "draft": false } -} \ No newline at end of file +} diff --git a/package.json b/package.json index be020b525..840e022e6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@developmentseed/veda-ui", "description": "Dashboard", - "version": "5.11.4", + "version": "5.11.3", "author": { "name": "Development Seed", "url": "https://developmentseed.org/"