This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
npm: bump rollup from 3.26.0 to 4.9.1 #151
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Version | |
on: | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
version: | |
if: startsWith(github.head_ref, 'release/') | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.semver.outputs.nextStrict }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Checkout PR | |
id: getpr | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh pr checkout ${{ github.event.pull_request.number }} | |
export PR_BRANCH=$(git branch --show-current) | |
echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT | |
- name: Get Version | |
id: semver | |
uses: ietf-tools/semver-action@v1 | |
with: | |
token: ${{ github.token }} | |
branch: ${{ steps.getpr.outputs.branch }} | |
- name: Set Dart Version | |
run: | | |
sed -i 's/version:*.*.*/version: ${{ steps.semver.outputs.nextStrict }}/' pubspec.yaml | |
- name: Set JS Version | |
id: package_version | |
uses: KageKirin/set-node-package-version@v1 | |
with: | |
version: ${{ steps.semver.outputs.nextStrict }} | |
- name: Setup Dart | |
uses: dart-lang/[email protected] | |
with: | |
sdk: 3.0.3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Dart dependencies | |
run: dart pub get | |
- name: Install JS dependencies | |
run: npm ci | |
- name: Update docs | |
run: npx typedoc src/index.ts | |
- name: Commit Changes | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GH Action" | |
git add pubspec.yaml | |
git add package.json | |
git add package-lock.json | |
git commit -m 'version bump' | |
git push |