Skip to content

release

release #23

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)
echo "New version: $NEW_VERSION"
sed -i "s/^version: .*/version: $NEW_VERSION/" pubspec.yaml
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
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