0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

ci: update publish workflow (#1361)

This commit is contained in:
Gao Sun 2022-07-02 12:08:19 +08:00 committed by GitHub
parent 9396808fa4
commit 159704d0ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 10 deletions

View file

@ -21,6 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: master
fetch-depth: 0
token: ${{ secrets.BOT_PAT }}
@ -48,18 +49,18 @@ jobs:
--conventional-commits \
--preid=${{ github.event.inputs.preid }} \
--no-verify-access \
--create-release=github \
--sign-git-commit \
--sign-git-tag \
--no-push \
--yes \
${{ github.event.inputs.semver }} ${{ github.event.inputs.append }}
env:
GH_TOKEN: ${{ secrets.BOT_PAT }}
- name: Package
run: ./package.sh
- name: Upload tar to GitHub release
uses: softprops/action-gh-release@v1
- name: Push to protected branch
uses: CasperWA/push-protected@v2
with:
files: /tmp/logto.tar.gz
token: ${{ secrets.BOT_PAT }}
branch: master
tags: true
timeout: 20

View file

@ -1,4 +1,4 @@
name: Dockerize
name: Release
on:
push:
@ -16,6 +16,8 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Docker meta
id: meta
@ -27,7 +29,7 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=dev
type=edge
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
@ -55,3 +57,20 @@ jobs:
- name: Health check
run: curl http://localhost:3001/api/status -If
create-github-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Package
run: ./package.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
files: /tmp/logto.tar.gz

View file

@ -21,7 +21,7 @@ jobs:
github-token: ${{ github.token }}
- name: Add assignees
if: ${{ github.event_name == 'pull_request' }}
if: github.event_name == 'pull_request'
uses: actions-ecosystem/action-add-assignees@v1
with:
github_token: ${{ github.token }}