diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c352d9..0b30728 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,6 @@ on: branches: - master -env: - IMAGE_REPO: eyblockchain/timber - jobs: release: runs-on: ubuntu-latest @@ -15,26 +12,20 @@ jobs: steps: - uses: actions/checkout@v1 - - name: release + - uses: codfish/semantic-release-action@master id: semantic - uses: codfish/semantic-release-action@v1.2.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: docker login - run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - - - name: build docker image - run: docker build ./merkle-tree --tag $IMAGE_REPO + - name: Build docker merkle-tree image + run: docker build ./merkle-tree - - name: docker push latest - run: docker push $IMAGE_REPO + - run: echo ${{ steps.semantic.outputs.release-version }} - - name: docker push release + - name: Docker push version if: steps.semantic.outputs.new-release-published == 'true' run: | - docker tag $IMAGE_REPO $IMAGE_REPO:$VERSION_TAG - docker push $IMAGE_REPO:$VERSION_TAG - env: - VERSION_TAG: v${{ steps.semantic.outputs.release-version }} + docker login https://docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN + docker build -t docker.pkg.github.com/eyblockchain/timber/timber:$RELEASE_VERSION . + docker push docker.pkg.github.com/eyblockchain/timber/timber:$RELEASE_VERSION