Skip to content

Commit

Permalink
fix: Release tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
arddluma committed Jun 14, 2024
1 parent 0c2dd5c commit ce8e3a1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build skandha unstable docker image
name: Build skandha v2 docker image

on:
push:
Expand All @@ -24,7 +24,17 @@ jobs:
-
name: Get package version
id: get_version
run: echo version=$(git rev-parse --short "$GITHUB_SHA") >> $GITHUB_OUTPUT
run: echo version=$(node -p "require('./package.json').version") >> $GITHUB_OUTPUT

- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to npm registry (release)
run: yarn run release:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

-
name: Build and push
uses: docker/build-push-action@v4
Expand All @@ -33,16 +43,15 @@ jobs:
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/skandha:unstable
${{ secrets.DOCKERHUB_USERNAME }}/skandha:unstable-${{ steps.get_version.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/skandha:v2-${{ steps.get_version.outputs.version }}
-
name: Create GitHub release
uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "unstable"
prerelease: true
title: Release unstable-${{ steps.get_version.outputs.version }}
automatic_release_tag: v2-${{ steps.get_version.outputs.version }}
prerelease: false
title: Release v2-${{ steps.get_version.outputs.version }}
-
name: Trigger dev pipeline
run: ${{ secrets.PIPELINE_DEV_TRIGGER }}
19 changes: 4 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build skandha docker image
name: Build skandha v1 docker image

on:
push:
Expand Down Expand Up @@ -30,16 +30,6 @@ jobs:
name: Get package version
id: get_version
run: echo version=$(node -p "require('./package.json').version") >> $GITHUB_OUTPUT

- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to npm registry (release)
if: ${{ !github.event.act }} # skip during local actions testing
run: yarn run release:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
Expand All @@ -49,8 +39,7 @@ jobs:
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/skandha:${{ steps.get_version.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/skandha:latest
${{ secrets.DOCKERHUB_USERNAME }}/skandha:v1-${{ steps.get_version.outputs.version }}
-
name: Trigger pipeline
run: ${{ secrets.PIPELINE_TRIGGER }}
Expand All @@ -60,9 +49,9 @@ jobs:
uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.get_version.outputs.version }}
automatic_release_tag: v1-${{ steps.get_version.outputs.version }}
prerelease: false
title: Release ${{ steps.get_version.outputs.version }}
title: Release v1-${{ steps.get_version.outputs.version }}
-
name: Trigger pipeline
run: ${{ secrets.PIPELINE_TRIGGER }}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
</p>
</div>

> [!IMPORTANT]
> **Skandha v1** - supports EntryPoint 0.6.0 and can be found on [master](https://github.com/etherspot/skandha/tree/master)
>
> **Skandha v2** - supports EntryPoint 0.7.0 and can be found on [develop](https://github.com/etherspot/skandha/tree/develop)
## Important links

**[Install Skandha](https://etherspot.fyi/skandha/installation)**
Expand Down

0 comments on commit ce8e3a1

Please sign in to comment.