-
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.
[ci] (fix): tagging and release on github
- Loading branch information
1 parent
afa3287
commit 12f5c34
Showing
3 changed files
with
83 additions
and
100 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,50 @@ | ||
name: Publish Release | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Tag] | ||
types: [completed] | ||
branches: [main] | ||
|
||
jobs: | ||
dist: | ||
name: Create Dist and Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20.x | ||
|
||
- id: set_var | ||
name: "Get Version" | ||
run: echo ::set-output name=version::$(node -p "require('./package.json').version") | ||
|
||
- name: Update npm | ||
run: npm install -g npm@latest | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Generate Dist Files | ||
run: npm run dist | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: dist/arunacore.zip | ||
tag_name: ${{ steps.set_var.outputs.version }} | ||
|
||
publish-docker: | ||
needs: [dist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger Update Docker Image | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
token: ${{ secrets.BOT_SECRET }} | ||
event-type: publish-docker-image | ||
repository: ArunaBot/ArunaCore-Docker |
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,33 @@ | ||
name: Publish Tag | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Test] | ||
types: [completed] | ||
branches: [main] | ||
|
||
jobs: | ||
tag: | ||
name: Publish Tag | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Refresh tags" | ||
id: refresh-tag | ||
run: git fetch --tags --force | ||
|
||
- id: set_var | ||
name: Get Version | ||
run: echo ::set-output name=version::$(node -p "require('./package.json').version") | ||
|
||
- name: Push Tag | ||
id: tag | ||
uses: anothrNick/github-tag-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
CUSTOM_TAG: "v${{ steps.set_var.outputs.version }}" | ||
|