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

refactor: added semantic-release-export-data & updated workflows #308

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
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
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- master
pull_request:
branches:
- '**'
- master
jobs:
tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -35,3 +35,27 @@ jobs:
run: npm run i18n_extract
- name: Coverage
uses: codecov/codecov-action@v3

get-next-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npx semantic-release --dry-run
id: get-next-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }}"
outputs:
new-release-published: ${{ steps.get-next-version.outputs.new-release-published }}
new-release-version: ${{ steps.get-next-version.outputs.new-release-version }}

build:
runs-on: ubuntu-latest
needs: get-next-version
steps:
- uses: actions/checkout@v3
- run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }}"
10 changes: 8 additions & 2 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"branch": "master",
"branches": ["master", "next"],
"tagFormat": "v${version}",
"verifyConditions": [
"@semantic-release/npm",
Expand All @@ -12,7 +12,13 @@
],
"analyzeCommits": "@semantic-release/commit-analyzer",
"generateNotes": "@semantic-release/release-notes-generator",
"prepare": "@semantic-release/npm",
"prepare": [
"@semantic-release/npm",
{
"path": "semantic-release-export-data",
"output": "release.json"
}
],
"publish": [
"@semantic-release/npm",
{
Expand Down
Loading