-
Notifications
You must be signed in to change notification settings - Fork 33
feat: add automated release workflow #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
38b2aed
Add release workflow
ayoung19 39c7cd5
Add version checking script
ayoung19 dc1c10d
Lmao
ayoung19 e39d06e
Revert
ayoung19 f35406b
Test
ayoung19 3bdf7ce
Test
ayoung19 0cf08d9
Woops
ayoung19 ae8be79
Bumps Version to v3.2.1
ayoung19 bc99c26
Add prettier
ayoung19 01d4975
Prettified Code!
ayoung19 d240b2e
???
ayoung19 e26446a
Prettified Code!
ayoung19 82643c1
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 5761b00
Bumps Version to v3.3.0
ayoung19 63c3e1b
Add the real release
ayoung19 15d03a8
Delete zip
ayoung19 894d0f5
Bumps Version to v5.0.0
ayoung19 3861cd8
Woops
ayoung19 e00c71a
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 b4d327a
woooow
ayoung19 81f2451
Bumps Version to v6.0.0
ayoung19 dba897a
dam
ayoung19 e4119cc
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 7b50fe9
Bumps Version to v7.0.0
ayoung19 612aeb2
Convert to pr
ayoung19 44aa7cb
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 7a71303
Correct pr creation
ayoung19 537acbf
Bumps Version to v8.0.0
actions-user a8b3184
??
ayoung19 cda1cd6
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 8869c30
Bumps Version to v9.0.0
actions-user 7224f3e
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 7eafe32
Bumps Version to v10.0.0 (#4)
github-actions[bot] fcdaad2
Revert
ayoung19 f788d61
Bumps Version to v12.0.0
ayoung19 1b8bb5b
Add token
ayoung19 01a0888
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 9441188
Bumps Version to v14.0.0
ayoung19 7c326ab
Change access token name
ayoung19 5a74e28
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 bf59b60
Set prettier options
ayoung19 d86493e
Bumps Version to v15.0.0
ayoung19 d2cd3a5
Wtf
ayoung19 a6f7331
Bumps Version to v16.0.0
ayoung19 faf68a4
?
ayoung19 d46bf0c
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 2c35aca
Bumps Version to v17.0.0
ayoung19 0e0f21d
Test
ayoung19 155cf4d
Bumps Version to v18.0.0
ayoung19 de9b88c
Wtf
ayoung19 ba9d981
Merge branch 'master' of github.com:ayoung19/extension
ayoung19 0586a6b
Bumps Version to v19.0.0
ayoung19 fbcf95c
Final
ayoung19 8c973ea
Add suggestions
ayoung19 2bc66ec
Remove relative path
ayoung19 d65c5bd
Bumps Version to v20.0.0
ayoung19 371019a
Revert "Bumps Version to v20.0.0"
ayoung19 5cb4fb5
Try new prettier options
ayoung19 88ba221
Bumps Version to v21.0.0
ayoung19 fe8d1b2
Revert "Bumps Version to v21.0.0"
ayoung19 7f7c530
Revert changes
ayoung19 574ee72
Bumps Version to v22.0.0
ayoung19 60415f1
???
ayoung19 b1a327f
Bumps Version to v23.0.0
ayoung19 4209258
lol
ayoung19 9edf01e
Bumps Version to v24.0.0
ayoung19 f74cac8
Lol
ayoung19 711db3e
Bumps Version to v25.0.0
ayoung19 bc0cb1d
Hm
ayoung19 a922719
Bumps Version to v26.0.0
ayoung19 a4c0665
Wow
ayoung19 d6f4970
Only format changed files
ayoung19 05cc05b
Hardcode version
ayoung19 7997405
Bumps Version to v30.0.0
ayoung19 673809f
Bumps Version to v32.0.0
ayoung19 55b8ca0
Undo version update
ayoung19 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,38 @@ | ||
| name: Extension Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: "ubuntu-latest" | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [16.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Build and compress | ||
| run: | | ||
| npm install | ||
| npm run build | ||
| zip -r extension-chrome.zip dist | ||
| rm -rf dist | ||
| npm run build_ff | ||
| zip -r extension-firefox.zip dist | ||
|
|
||
| - uses: "marvinpinto/action-automatic-releases@v1.2.1" | ||
| with: | ||
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
| prerelease: false | ||
| files: | | ||
| extension-chrome.zip | ||
| extension-firefox.zip | ||
This file contains hidden or 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,50 @@ | ||
| name: Extension Upgrade | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: Version | ||
| required: true | ||
|
|
||
| jobs: | ||
| upgrade: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [16.x] | ||
|
|
||
| steps: | ||
| - name: Checkout Branch | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Update manifest/package.json version | ||
| run: | | ||
| ./scripts/version-check.sh | ||
| jq '.version = $ENV.VERSION' manifest.json > tmp && mv tmp manifest.json | ||
| jq '.version = $ENV.VERSION' package.json > tmp && mv tmp package.json | ||
| jq '.version = $ENV.VERSION | .packages."".version = $ENV.VERSION' package-lock.json > tmp && mv tmp package-lock.json | ||
| npm install | ||
| npx prettier --write manifest.json package.json package-lock.json | ||
| env: | ||
| VERSION: ${{ inputs.version }} | ||
|
|
||
| - name: Add and commit | ||
| uses: EndBug/add-and-commit@v9 | ||
| with: | ||
| message: "Bumps Version to v${{ inputs.version }}" | ||
| tag: "v${{ inputs.version }}" | ||
|
|
||
| - name: Push changes | ||
| uses: ad-m/github-push-action@v0.6.0 | ||
| with: | ||
| github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
| branch: ${{ github.ref }} |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2,5 +2,3 @@ node_modules/ | |
| dist/ | ||
| webpack.config.js | ||
| .idea/ | ||
| package.json | ||
| package-lock.json | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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,27 @@ | ||
| CURRENT_VERSION=$(jq '.version' manifest.json | tr -d '"') | ||
| NEW_VERSION="$VERSION" | ||
|
|
||
| if ! echo "$CURRENT_VERSION" | grep -Eq '^[0-9]+.[0-9]+.[0-9]+$'; then | ||
| echo Error: Current version not in valid format | ||
| exit 1 | ||
| fi | ||
|
|
||
| if ! echo "$NEW_VERSION" | grep -Eq '^[0-9]+.[0-9]+.[0-9]+$'; then | ||
| echo Error: New version not in valid format | ||
| exit 1 | ||
| fi | ||
|
|
||
| IFS='.' read -ra CURR <<< "$CURRENT_VERSION" | ||
| IFS='.' read -ra NEW <<< "$NEW_VERSION" | ||
|
|
||
| for i in ${!NEW[*]}; do | ||
| if [ $((NEW[i])) -lt $((CURR[i])) ]; then | ||
| echo ERROR: New release version is less than current release version | ||
| exit 1 | ||
| elif [ $((NEW[i])) -gt $((CURR[i])) ]; then | ||
| exit 0 | ||
| fi | ||
| done | ||
|
|
||
| echo Error: Current and new version are equal | ||
| exit 1 |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.