forked from Akryum/floating-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π·ββοΈ Build and release on Github Actions
- Loading branch information
1 parent
75e5150
commit 476f0bb
Showing
5 changed files
with
89 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
- uses: pnpm/action-setup@v2 | ||
- name: Install | ||
run: pnpm install | ||
- name: Publish | ||
run: cd packages/floating-vue && npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# Use PAT instead of default Github token, because the default | ||
# token deliberately will not trigger another workflow run | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
- uses: pnpm/action-setup@v2 | ||
- name: Install | ||
run: pnpm install | ||
- name: Lint | ||
run: pnpm lint | ||
- name: Build | ||
run: pnpm build | ||
- name: Test | ||
run: pnpm test | ||
- name: Tag | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: ./tag.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "floating-vue", | ||
"version": "2.0.0-beta.24", | ||
"name": "@reedsy/floating-vue", | ||
"version": "2.0.0-reedsy.1.0.0", | ||
"description": "Easy Vue tooltips, dropdowns, menus & popovers using floating-ui", | ||
"author": "Guillaume Chau <[email protected]>", | ||
"scripts": { | ||
|
@@ -75,7 +75,7 @@ | |
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Akryum/floating-vue.git", | ||
"url": "git+https://github.com/reedsy/floating-vue.git", | ||
"directory": "packages/floating-vue" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
VERSION=$(node -p "require('.packages/floating-vue/package.json').version") | ||
|
||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git fetch --tags | ||
|
||
VERSION_COUNT=$(git tag --list $VERSION | wc -l) | ||
|
||
if [ $VERSION_COUNT -gt 0 ] | ||
then | ||
echo "Version $VERSION already deployed." | ||
exit 0 | ||
else | ||
echo "Deploying version $VERSION" | ||
fi | ||
|
||
echo '!/dist' >> .gitignore | ||
|
||
git checkout -b release-$VERSION | ||
git add .gitignore | ||
git add --all dist/ | ||
git commit --message "Release version $VERSION" | ||
git tag $VERSION | ||
git push origin refs/tags/$VERSION |