From 2394e57ca0b5a58a76170ced4505630d335bf70e Mon Sep 17 00:00:00 2001 From: folex <0xdxdy@gmail.com> Date: Thu, 2 Sep 2021 18:17:58 +0300 Subject: [PATCH] CI: update version in node-distro (#24) --- .github/workflows/release.yml | 21 ++++++--------------- .github/workflows/tag.yml | 8 ++++++++ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c2937a..4e3b6e8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,7 +89,7 @@ jobs: npm run build - name: Build Changelog - id: github_release + id: changelog uses: mikepenz/release-changelog-builder-action@v1 with: configuration: ".github/workflows/changelog_config.json" @@ -105,20 +105,11 @@ jobs: tag_name: ${{ env.RELEASE_VERSION }} files: | ./service/aqua-ipfs.tar.gz - body: ${{steps.github_release.outputs.changelog}} + body: ${{steps.changelog.outputs.changelog}} draft: false prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - ### Rebuild node-distro - - name: Trigger new node-distro container - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: Publish Container - repo: fluencelabs/node-distro - ref: 'main' - token: ${{ secrets.PERSONAL_TOKEN }} ### Publish Aqua API - name: Publish Aqua API to NPM @@ -138,7 +129,7 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: ./aqua/target/typescript -## Update Builtin Services repo +## Update node-distro repo - name: Get tar.gz URL id: package-url uses: actions/github-script@v4 @@ -168,11 +159,11 @@ jobs: echo $(sha256sum ./service/aqua-ipfs.tar.gz) echo "SHA256=$(sha256sum ./service/aqua-ipfs.tar.gz | awk '{ print $1 }')" >> $GITHUB_ENV - - name: Update version in builtins repo + - name: Update version in node-distro repo uses: benc-uk/workflow-dispatch@v1 with: workflow: update_service - repo: fluencelabs/builtin-services + repo: fluencelabs/node-distro ref: 'main' token: ${{ secrets.PERSONAL_TOKEN }} inputs: '{ @@ -188,4 +179,4 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | console.dir(core); - core.info("aqua-ipfs was updated to ${{ env.RELEASE_VERSION }} in Builtin Services Repo"); + core.info("aqua-ipfs was updated to ${{ env.RELEASE_VERSION }} in node-distro repo"); diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index c0cb8c3..4f26d22 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -10,8 +10,16 @@ jobs: steps: - uses: actions/checkout@v2 + + - name: Get branch + run: | + BRANCH=${GITHUB_REF#refs/*/} + SANITIZED=$(echo "$BRANCH" | sed -e 's/[^a-zA-Z0-9-]/-/g') + echo "BRANCH=$SANITIZED" >> $GITHUB_ENV + - name: Bump version and push tag id: tag_version uses: mathieudutour/github-tag-action@v5.5 with: + append_to_pre_release_tag: ${{ env.BRANCH }} github_token: ${{ secrets.PERSONAL_TOKEN }}