Skip to content

Commit

Permalink
distpatch test
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-bisonai committed May 29, 2024
1 parent 45cc208 commit b116002
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
43 changes: 32 additions & 11 deletions .github/workflows/tag+deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,7 @@ jobs:
img_tag: ${{ steps.img-tag.outputs.img_tag }}

steps:
- uses: actions/checkout@master

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22.3"
check-latest: true
cache-dependency-path: |
./${{ needs.prepare.outputs.service }}/go.sum
./${{ needs.prepare.outputs.service }}/go.mod
if: ${{ needs.prepare.outputs.service != 'core' || needs.prepare.outputs.service != 'fetcher' || needs.prepare.outputs.service != 'cli' }}
- uses: actions/checkout@v4

- name: docker build ${{ needs.prepare.outputs.service }}
run: SERVICE_NAME=orakl-${{ needs.prepare.outputs.service }} docker compose -f docker-compose.build.yaml build
Expand Down Expand Up @@ -139,6 +129,37 @@ jobs:
PAT: ${{ secrets.PAT }}
if: ${{ success() }}

update-package-json-version:
name: Update package.json version
needs: [prepare, build, image-update]
runs-on: ubuntu-latest
steps:

- name: Read package.json
id: package
uses: juliangruber/read-file-action@v1
with:
path: ./package.json
- name: Echo package.json
run: echo "${{ steps.package.outputs.content }}"

- name: update package.json version
if: needs.prepare.outputs.version
run: |
version=v${{ needs.prepare.outputs.version }}
echo "updating package.json to version $version"
cd ./${{ needs.prepare.outputs.service }}
npm version $version --no-git-tag-version
- name: commit updated package.json
if: needs.prepare.outputs.version
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add package.json
git commit -m "chore: update package.json version to ${{ needs.prepare.outputs.version }}"
git push origin HEAD:${{ github.ref_name }}
post-slack-tag-update-success:
name: Post slack message for tag update success
needs: [prepare, build, image-update]
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bisonai/orakl-cli",
"version": "0.6.2",
"version": "0.6.1",
"type": "module",
"description": "The Orakl Network CLI",
"files": [
Expand Down

0 comments on commit b116002

Please sign in to comment.