Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): Use release-please #418

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 23 additions & 25 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
---
name: Release

on:
push:
branches:
- main

permissions:
actions: write
contents: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: release
name: Run release please
uses: google-github-actions/release-please-action@v3
with:
command: manifest
- if: steps.release.outputs.releases_created && inputs.publish-workflow != ''
name: Trigger Publish
uses: actions/github-script@v6
with:
fetch-depth: 0
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- uses: actions/setup-node@v3
- run: |
yarn
- run: |
yarn all
- name: Check for diff
id: diff
run: echo "::set-output name=GIT_STATUS::$(git status -s dist/)"
- name: Push build
if: ${{ steps.diff.outputs.GIT_STATUS != '' }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add dist/*
git commit -m "chore: Build Source"
git push
- run: |
npm install semantic-release semantic-release/git
npx semantic-release --debug --no-ci
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
github-token: ${{ (secrets.github-token != '' && secrets.github-token) || secrets.GITHUB_TOKEN }}
retries: 3
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: '${{ inputs.publish-workflow }}',
ref: '${{ steps.release.outputs.tag_name }}'
})
11 changes: 11 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@ jobs:
yarn
- run: |
yarn all
- name: Check for diff
id: diff
run: echo "::set-output name=GIT_STATUS::$(git status -s dist/)"
- name: Push build
if: ${{ steps.diff.outputs.GIT_STATUS != '' }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add dist/*
git commit -m "chore: Build Source"
git push
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.0.3"
}
32 changes: 0 additions & 32 deletions .releaserc.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"release-type": "simple",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease": false
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
Loading