Skip to content

release

release #40

Workflow file for this run

name: release
on:
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
environment:
name: semver
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Update Pubspec Version
run: |
NEW_VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
echo "New version: $NEW_VERSION"
sed -i "s/^version: .*/version: $NEW_VERSION/" pubspec.yaml
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add pubspec.yaml
git commit -m "ci: update pubspec version to $NEW_VERSION"
git push https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/Jiseeeh/u-do-note.git HEAD:main