forked from vuejs/vuex
-
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.
- Loading branch information
1 parent
8956c43
commit 03bed24
Showing
8 changed files
with
103 additions
and
8,351 deletions.
There are no files selected for viewing
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,32 @@ | ||
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' | ||
- name: Install | ||
# Skip post-install to avoid malicious scripts stealing PAT | ||
run: npm install --ignore-script | ||
env: | ||
# GITHUB_TOKEN can't access packages hosted in private repos, | ||
# even within the same organisation | ||
NODE_AUTH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
- name: Post-install | ||
run: npm rebuild && npm run prepare --if-present | ||
- name: Build | ||
run: npm run build | ||
- name: Publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,40 @@ | ||
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: '16.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
- name: Install | ||
# Skip post-install to avoid malicious scripts stealing PAT | ||
run: npm install --ignore-script | ||
env: | ||
# GITHUB_TOKEN can't access packages hosted in private repos, | ||
# even within the same organisation | ||
NODE_AUTH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
- name: Post-install | ||
run: npm rebuild && npm run prepare --if-present | ||
- name: Lint | ||
run: npm run lint | ||
- name: Test | ||
run: npm 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 |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
*.log | ||
.DS_Store | ||
node_modules | ||
package-lock.json |
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
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,26 @@ | ||
#!/bin/bash | ||
|
||
VERSION=$(node -p "require('./package.json').version") | ||
|
||
git config --local user.email "github@reedsy.com" | ||
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 |
Oops, something went wrong.