Skip to content

Commit

Permalink
Update workflow for my repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sinsinpub committed Dec 17, 2020
1 parent 8bc5b2a commit 70a9796
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: CI Build
on:
push:
branches:
- webstore
- release

jobs:
build:
Expand Down Expand Up @@ -47,32 +47,33 @@ jobs:
run: |
grunt build
echo KC3Kai $PACKAGE_VERSION package build/release.zip will be built
grunt package
# PACKAGE AND DEPLOY TO CHROME WEBSTORE
- name: Publish to webstore
timeout-minutes: 10
env:
WEBSTORE_CLIENT_ID: ${{ secrets.WEBSTORE_CLIENT_ID }}
WEBSTORE_CLIENT_SECRET: ${{ secrets.WEBSTORE_CLIENT_SECRET }}
WEBSTORE_REFRESH_TOKEN: ${{ secrets.WEBSTORE_REFRESH_TOKEN }}
run: grunt webstore
# - name: Publish to webstore
# timeout-minutes: 10
# env:
# WEBSTORE_CLIENT_ID: ${{ secrets.WEBSTORE_CLIENT_ID }}
# WEBSTORE_CLIENT_SECRET: ${{ secrets.WEBSTORE_CLIENT_SECRET }}
# WEBSTORE_REFRESH_TOKEN: ${{ secrets.WEBSTORE_REFRESH_TOKEN }}
# run: grunt webstore
# DEPLOY TO GITHUB RELEASES
- name: Push git tag
timeout-minutes: 10
env:
KC3_VERSION: ${{ env.PACKAGE_VERSION }}
GITHUB_TOKEN: ${{ secrets.GH_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
git config --global user.email "[email protected]"
git config --global user.name "sinsinpub"
git tag $KC3_VERSION -a -m "Automated GitHub release for $KC3_VERSION"
git push -q https://dragonjet:[email protected]/KC3Kai/KC3Kai --tags
git push -q https://sinsinpub:[email protected]/sinsinpub/KC3Kai --tags
- name: Create release
id: create_release
# https://github.com/actions/create-release
uses: actions/create-release@v1
env:
KC3_VERSION: ${{ env.PACKAGE_VERSION }}
GITHUB_TOKEN: ${{ secrets.GH_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
with:
tag_name: ${{ env.KC3_VERSION }}
release_name: ${{ env.KC3_VERSION }}
Expand All @@ -83,7 +84,7 @@ jobs:
uses: actions/upload-release-asset@v1
env:
KC3_VERSION: ${{ env.PACKAGE_VERSION }}
GITHUB_TOKEN: ${{ secrets.GH_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/release.zip
Expand Down

0 comments on commit 70a9796

Please sign in to comment.