Skip to content

Commit

Permalink
Merge pull request #22 from ruedigerp/develop
Browse files Browse the repository at this point in the history
fix: bump version
  • Loading branch information
ruedigerp authored Dec 11, 2024
2 parents 0902e4e + 860e08c commit f288363
Showing 1 changed file with 44 additions and 18 deletions.
62 changes: 44 additions & 18 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,35 +66,61 @@ jobs:
# # 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 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: Install dependencies
run: npm install
- name: Get latest tag
id: get_tag
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV

- name: Apply Changesets
id: changesets
- name: Bump version
id: bump_version
run: |
version=${tag/v/} # Entfernt das 'v' vor der Version
IFS='.' read -r major minor patch <<< "$version"
patch=$((patch + 1)) # Erhöht die Patch-Version
new_version="v${major}.${minor}.${patch}"
echo "new_version=$new_version" >> $GITHUB_ENV
- name: Create new tag
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
git tag ${{ env.new_version }}
git push origin ${{ env.new_version }}
- name: Create release in another repo
run: |
echo "Creating release ${tag}"
gh release create refs/tags/${tag} --title "Release ${tag}" --repo ruedigerp/homebrew-dns-manager
gh release create ${{ env.new_version }} --title "Release ${{ env.new_version }}" --repo ruedigerp/homebrew-dns-manager
env:
GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }}

# - name: Create release in another repo
# run: |
# echo "Creating release ${tag}"
# gh release create refs/tags/${tag} --title "Release ${tag}" --repo ruedigerp/homebrew-dns-manager
# env:
# GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }}

- name: Initialize Go dependencies
run: go mod tidy

Expand Down

0 comments on commit f288363

Please sign in to comment.