|
|
@@ -3,9 +3,8 @@ name: Release
|
|
|
on:
|
|
|
pull_request:
|
|
|
branches:
|
|
|
- # - release/current
|
|
|
- # - release/*.*.*
|
|
|
- - release/test
|
|
|
+ - release/current
|
|
|
+ - release/*.*.*
|
|
|
types: [closed]
|
|
|
|
|
|
jobs:
|
|
|
@@ -16,7 +15,7 @@ jobs:
|
|
|
if: github.event.pull_request.merged == true
|
|
|
|
|
|
outputs:
|
|
|
- RELEASED_VERSION: ${{ steps.package-json.outputs.packageVersion }}-TEST
|
|
|
+ RELEASED_VERSION: ${{ steps.package-json.outputs.packageVersion }}
|
|
|
|
|
|
steps:
|
|
|
- uses: actions/checkout@v3
|
|
|
@@ -59,68 +58,67 @@ jobs:
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
with:
|
|
|
branch: ${{ github.event.pull_request.base.ref }}
|
|
|
- commit_message: Release v${{ steps.package-json.outputs.packageVersion }}-TEST
|
|
|
- tagging_message: v${{ steps.package-json.outputs.packageVersion }}-TEST
|
|
|
+ commit_message: Release v${{ steps.package-json.outputs.packageVersion }}
|
|
|
+ tagging_message: v${{ steps.package-json.outputs.packageVersion }}
|
|
|
|
|
|
- uses: ncipollo/release-action@v1
|
|
|
with:
|
|
|
body: ${{ github.event.pull_request.body }}
|
|
|
- tag: v${{ steps.package-json.outputs.packageVersion }}-TEST
|
|
|
+ tag: v${{ steps.package-json.outputs.packageVersion }}
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
- # - name: Delete drafts
|
|
|
- # uses: hugo19941994/delete-draft-releases@v1.0.0
|
|
|
- # env:
|
|
|
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
-
|
|
|
+ - name: Delete drafts
|
|
|
+ uses: hugo19941994/delete-draft-releases@v1.0.0
|
|
|
+ env:
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
- # create-pr-for-next-rc:
|
|
|
- # needs: create-github-release
|
|
|
|
|
|
- # runs-on: ubuntu-latest
|
|
|
+ create-pr-for-next-rc:
|
|
|
+ needs: create-github-release
|
|
|
|
|
|
- # steps:
|
|
|
- # - uses: actions/checkout@v3
|
|
|
- # with:
|
|
|
- # ref: v${{ needs.create-github-release.outputs.RELEASED_VERSION }}
|
|
|
+ runs-on: ubuntu-latest
|
|
|
|
|
|
- # - uses: actions/setup-node@v3
|
|
|
- # with:
|
|
|
- # node-version: '16'
|
|
|
- # cache: 'yarn'
|
|
|
- # cache-dependency-path: '**/yarn.lock'
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v3
|
|
|
+ with:
|
|
|
+ ref: v${{ needs.create-github-release.outputs.RELEASED_VERSION }}
|
|
|
|
|
|
- # - name: Install dependencies
|
|
|
- # run: |
|
|
|
- # npx lerna bootstrap
|
|
|
+ - uses: actions/setup-node@v3
|
|
|
+ with:
|
|
|
+ node-version: '16'
|
|
|
+ cache: 'yarn'
|
|
|
+ cache-dependency-path: '**/yarn.lock'
|
|
|
|
|
|
- # - name: Bump versions for next RC
|
|
|
- # run: |
|
|
|
- # yarn bump-versions:rc
|
|
|
- # yarn bump-versions:slackbot-proxy
|
|
|
+ - name: Install dependencies
|
|
|
+ run: |
|
|
|
+ npx lerna bootstrap
|
|
|
|
|
|
- # - name: Retrieve information from package.json
|
|
|
- # uses: myrotvorets/info-from-package-json-action@1.2.0
|
|
|
- # id: package-json
|
|
|
+ - name: Bump versions for next RC
|
|
|
+ run: |
|
|
|
+ yarn bump-versions:rc
|
|
|
+ yarn bump-versions:slackbot-proxy
|
|
|
|
|
|
- # - name: Commit
|
|
|
- # uses: github-actions-x/commit@v2.9
|
|
|
- # with:
|
|
|
- # github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- # push-branch: support/prepare-v${{ steps.package-json.outputs.packageVersion }}
|
|
|
- # commit-message: 'Bump version'
|
|
|
- # name: GitHub Action
|
|
|
+ - name: Retrieve information from package.json
|
|
|
+ uses: myrotvorets/info-from-package-json-action@1.2.0
|
|
|
+ id: package-json
|
|
|
|
|
|
- # - name: Create PR
|
|
|
- # uses: repo-sync/pull-request@v2
|
|
|
- # with:
|
|
|
- # source_branch: support/prepare-v${{ steps.package-json.outputs.packageVersion }}
|
|
|
- # destination_branch: master
|
|
|
- # pr_title: Prepare v${{ steps.package-json.outputs.packageVersion }}
|
|
|
- # pr_label: exclude from changelog,prepare next version
|
|
|
- # pr_body: "An automated PR generated by create-pr-for-next-rc"
|
|
|
- # github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+ - name: Commit
|
|
|
+ uses: github-actions-x/commit@v2.9
|
|
|
+ with:
|
|
|
+ github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+ push-branch: support/prepare-v${{ steps.package-json.outputs.packageVersion }}
|
|
|
+ commit-message: 'Bump version'
|
|
|
+ name: GitHub Action
|
|
|
|
|
|
+ - name: Create PR
|
|
|
+ uses: repo-sync/pull-request@v2
|
|
|
+ with:
|
|
|
+ source_branch: support/prepare-v${{ steps.package-json.outputs.packageVersion }}
|
|
|
+ destination_branch: master
|
|
|
+ pr_title: Prepare v${{ steps.package-json.outputs.packageVersion }}
|
|
|
+ pr_label: exclude from changelog,prepare next version
|
|
|
+ pr_body: "An automated PR generated by create-pr-for-next-rc"
|
|
|
+ github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
determine-tags:
|
|
|
@@ -142,7 +140,7 @@ jobs:
|
|
|
uses: docker/metadata-action@v4
|
|
|
id: meta
|
|
|
with:
|
|
|
- images: docker.io/weseek/growi-codebuild-test
|
|
|
+ images: docker.io/weseek/growi
|
|
|
sep-tags: ','
|
|
|
tags: |
|
|
|
type=raw,value=latest
|
|
|
@@ -154,7 +152,7 @@ jobs:
|
|
|
uses: docker/metadata-action@v4
|
|
|
id: meta-ghcr
|
|
|
with:
|
|
|
- images: ghcr.io/weseek/growi-codebuild-test
|
|
|
+ images: ghcr.io/weseek/growi
|
|
|
sep-tags: ','
|
|
|
tags: |
|
|
|
type=raw,value=latest
|
|
|
@@ -166,10 +164,10 @@ jobs:
|
|
|
build-image:
|
|
|
needs: create-github-release
|
|
|
|
|
|
- uses: weseek/growi/.github/workflows/reusable-app-build-image.yml@support/build-with-codebuild
|
|
|
+ uses: weseek/growi/.github/workflows/reusable-app-build-image.yml@master
|
|
|
with:
|
|
|
source-version: refs/tags/v${{ needs.create-github-release.outputs.RELEASED_VERSION }}
|
|
|
- image-name: weseek/growi-codebuild-test
|
|
|
+ image-name: weseek/growi
|
|
|
tag-temporary: latest
|
|
|
secrets:
|
|
|
AWS_ROLE_TO_ASSUME_FOR_OIDC: ${{ secrets.AWS_ROLE_TO_ASSUME_FOR_OIDC }}
|
|
|
@@ -178,11 +176,10 @@ jobs:
|
|
|
publish-image:
|
|
|
needs: [determine-tags, build-image]
|
|
|
|
|
|
- uses: weseek/growi/.github/workflows/reusable-app-create-manifests.yml@support/build-with-codebuild
|
|
|
- with:
|
|
|
+ uses: weseek/growi/.github/workflows/reusable-app-create-manifests.yml@master
|
|
|
tags: ${{ needs.determine-tags.outputs.TAGS }}
|
|
|
registry: docker.io
|
|
|
- image-name: weseek/growi-codebuild-test
|
|
|
+ image-name: weseek/growi
|
|
|
tag-temporary: latest
|
|
|
secrets:
|
|
|
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
|
@@ -190,11 +187,11 @@ jobs:
|
|
|
publish-image-ghcr:
|
|
|
needs: [determine-tags, build-image]
|
|
|
|
|
|
- uses: weseek/growi/.github/workflows/reusable-app-create-manifests.yml@support/build-with-codebuild
|
|
|
+ uses: weseek/growi/.github/workflows/reusable-app-create-manifests.yml@master
|
|
|
with:
|
|
|
tags: ${{ needs.determine-tags.outputs.TAGS_GHCR }}
|
|
|
registry: ghcr.io
|
|
|
- image-name: weseek/growi-codebuild-test
|
|
|
+ image-name: weseek/growi
|
|
|
tag-temporary: latest
|
|
|
secrets:
|
|
|
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_ON_GITHUB_PASSWORD }}
|
|
|
@@ -209,13 +206,13 @@ jobs:
|
|
|
with:
|
|
|
ref: v${{ needs.create-github-release.outputs.RELEASED_VERSION }}
|
|
|
|
|
|
- # - name: Update Docker Hub Description
|
|
|
- # uses: peter-evans/dockerhub-description@v3
|
|
|
- # with:
|
|
|
- # username: wsmoogle
|
|
|
- # password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
|
- # repository: weseek/growi
|
|
|
- # readme-filepath: ./packages/app/docker/README.md
|
|
|
+ - name: Update Docker Hub Description
|
|
|
+ uses: peter-evans/dockerhub-description@v3
|
|
|
+ with:
|
|
|
+ username: wsmoogle
|
|
|
+ password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
|
+ repository: weseek/growi
|
|
|
+ readme-filepath: ./packages/app/docker/README.md
|
|
|
|
|
|
- name: Slack Notification
|
|
|
uses: weseek/ghaction-release-slack-notification@master
|