Release v7.0.0 #310
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
pull_request: | |
branches: | |
- release/current | |
- release/*.*.* | |
types: [closed] | |
jobs: | |
create-github-release: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true | |
outputs: | |
RELEASED_VERSION: ${{ steps.package-json.outputs.packageVersion }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.base.ref }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'yarn' | |
cache-dependency-path: '**/yarn.lock' | |
- name: Install dependencies | |
run: | | |
yarn global add turbo | |
yarn global add node-gyp | |
yarn --frozen-lockfile | |
- name: Bump versions | |
run: | | |
turbo run version --filter=@growi/app -- --patch | |
yarn upgrade --scope=@growi | |
sh ./apps/app/bin/github-actions/update-readme.sh | |
- name: Retrieve information from package.json | |
uses: myrotvorets/[email protected] | |
id: package-json | |
- name: Update Changelog | |
uses: stefanzweifel/changelog-updater-action@v1 | |
with: | |
latest-version: v${{ steps.package-json.outputs.packageVersion }} | |
release-notes: ${{ github.event.pull_request.body }} | |
- name: Update README.md for docker image | |
working-directory: ./apps/app | |
run: | | |
sh ./bin/github-actions/update-readme.sh | |
env: | |
RELEASED_VERSION: ${{ steps.package-json.outputs.packageVersion }} | |
- name: Commit, Tag and Push | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
branch: ${{ github.event.pull_request.base.ref }} | |
commit_message: Release v${{ steps.package-json.outputs.packageVersion }} | |
tagging_message: v${{ steps.package-json.outputs.packageVersion }} | |
- uses: softprops/action-gh-release@v1 | |
with: | |
body: ${{ github.event.pull_request.body }} | |
tag_name: v${{ steps.package-json.outputs.packageVersion }} | |
target_commitish: ${{ github.head_ref }} | |
- name: Delete drafts | |
uses: hugo19941994/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
determine-tags: | |
needs: create-github-release | |
runs-on: ubuntu-latest | |
outputs: | |
TAGS: ${{ steps.meta.outputs.tags }} | |
TAGS_GHCR: ${{ steps.meta-ghcr.outputs.tags }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Retrieve information from package.json | |
uses: myrotvorets/[email protected] | |
id: package-json | |
- name: Docker meta for docker.io | |
uses: docker/metadata-action@v4 | |
id: meta | |
with: | |
images: docker.io/weseek/growi | |
sep-tags: ',' | |
tags: | | |
type=raw,value=latest | |
type=semver,value=${{ needs.create-github-release.outputs.RELEASED_VERSION }},pattern={{major}} | |
type=semver,value=${{ needs.create-github-release.outputs.RELEASED_VERSION }},pattern={{major}}.{{minor}} | |
type=semver,value=${{ needs.create-github-release.outputs.RELEASED_VERSION }},pattern={{major}}.{{minor}}.{{patch}} | |
- name: Docker meta for ghcr.io | |
uses: docker/metadata-action@v4 | |
id: meta-ghcr | |
with: | |
images: ghcr.io/weseek/growi | |
sep-tags: ',' | |
tags: | | |
type=raw,value=latest | |
type=semver,value=${{ needs.create-github-release.outputs.RELEASED_VERSION }},pattern={{major}} | |
type=semver,value=${{ needs.create-github-release.outputs.RELEASED_VERSION }},pattern={{major}}.{{minor}} | |
type=semver,value=${{ needs.create-github-release.outputs.RELEASED_VERSION }},pattern={{major}}.{{minor}}.{{patch}} | |
build-image: | |
needs: create-github-release | |
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 | |
tag-temporary: latest | |
secrets: | |
AWS_ROLE_TO_ASSUME_FOR_OIDC: ${{ secrets.AWS_ROLE_TO_ASSUME_FOR_OIDC }} | |
publish-image: | |
needs: [determine-tags, build-image] | |
uses: weseek/growi/.github/workflows/reusable-app-create-manifests.yml@master | |
with: | |
tags: ${{ needs.determine-tags.outputs.TAGS }} | |
registry: docker.io | |
image-name: weseek/growi | |
tag-temporary: latest | |
secrets: | |
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | |
publish-image-ghcr: | |
needs: [determine-tags, build-image] | |
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 | |
tag-temporary: latest | |
secrets: | |
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_ON_GITHUB_PASSWORD }} | |
post-publish: | |
needs: [create-github-release, publish-image, publish-image-ghcr] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
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: ./apps/app/docker/README.md | |
- name: Slack Notification | |
uses: weseek/ghaction-release-slack-notification@master | |
with: | |
channel: '#release' | |
url: ${{ secrets.SLACK_WEBHOOK_URL }} | |
created_tag: 'v${{ needs.create-github-release.outputs.RELEASED_VERSION }}' | |
create-pr-for-next-rc: | |
needs: [create-github-release, publish-image, publish-image-ghcr] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: v${{ needs.create-github-release.outputs.RELEASED_VERSION }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'yarn' | |
cache-dependency-path: '**/yarn.lock' | |
- name: Install dependencies | |
run: | | |
yarn global add turbo | |
yarn global add node-gyp | |
yarn --frozen-lockfile | |
- name: Bump versions for next RC | |
run: | | |
turbo run version --filter=@growi/app -- --prepatch | |
turbo run version --filter=@growi/slackbot-proxy -- --prepatch | |
yarn upgrade --scope=@growi | |
- name: Retrieve information from package.json | |
uses: myrotvorets/[email protected] | |
id: package-json | |
- name: Commit | |
uses: github-actions-x/[email protected] | |
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: ${{ github.head_ref }} | |
pr_title: Prepare v${{ steps.package-json.outputs.packageVersion }} | |
pr_label: flag/exclude-from-changelog,type/prepare-next-version | |
pr_body: "[skip ci] An automated PR generated by create-pr-for-next-rc" | |
github_token: ${{ secrets.GITHUB_TOKEN }} |