Skip to content

Commit

Permalink
Merge pull request #21 from ruedigerp/develop
Browse files Browse the repository at this point in the history
fix: changeset to main build
  • Loading branch information
ruedigerp authored Dec 11, 2024
2 parents f12897f + d0acaed commit 0902e4e
Showing 1 changed file with 35 additions and 13 deletions.
48 changes: 35 additions & 13 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,43 @@ jobs:
# id: get_version
# run: echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV

- name: release-please
uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.MO_CLI_TOKEN }}
release-type: simple
target-branch: ${{ github.ref_name }}
# - name: release-please
# uses: googleapis/release-please-action@v4
# id: release
# with:
# token: ${{ secrets.MO_CLI_TOKEN }}
# release-type: simple
# target-branch: ${{ github.ref_name }}

- name: Fetch latest tags
run: git fetch --tags
# - name: Fetch latest tags
# run: git fetch --tags

- name: Get latest version tag
id: get_tag
# run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
run: echo "tag=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
# - name: Get latest version tag
# id: get_tag
# # run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
# run: echo "tag=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install dependencies
run: npm install

- name: Apply Changesets
id: changesets
run: |
# Bump the version and commit the changes
npx changeset version
# Push the changes back to the repo
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git push --follow-tags origin ${{ github.ref_name }}
- name: Extract new version
id: get_version
run: echo "tag=$(node -p \"require('./package.json').version\")" >> $GITHUB_ENV

- name: Create release in another repo
run: |
Expand Down

0 comments on commit 0902e4e

Please sign in to comment.