Browse Source

Add dispatch workflow for creating release

Anuj Bansal 3 years ago
parent
commit
4a0504131d
1 changed files with 45 additions and 0 deletions
  1. 45 0
      .github/workflows/create-release.yml

+ 45 - 0
.github/workflows/create-release.yml

@@ -0,0 +1,45 @@
+name: Create release
+
+on:
+  workflow_dispatch:
+    inputs:
+      name:
+        description: 'Release name (v9.3.0 - Antioch)'
+        required: true
+      tag:
+        description: 'Tag (v9.3.0)'
+        required: true
+
+env:
+  REPOSITORY: ahhda/joystream
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - id: compute_shasum
+        name: Compute runtime code shasum
+        run: |
+          export RUNTIME_CODE_SHASUM=`scripts/runtime-code-shasum.sh`
+          echo "::set-output name=shasum::${RUNTIME_CODE_SHASUM}"
+
+      - id: extract_binaries
+        name: Copy binaries from docker files
+        run: |
+          docker cp $(docker create --rm ${{ env.REPOSITORY }}:${{ steps.compute_shasum.outputs.shasum }}-amd64):/joystream/node ./node-amd64
+          docker cp $(docker create --rm ${{ env.REPOSITORY }}:${{ steps.compute_shasum.outputs.shasum }}-arm64):/joystream/node ./node-arm64
+          docker cp $(docker create --rm ${{ env.REPOSITORY }}:${{ steps.compute_shasum.outputs.shasum }}-arm):/joystream/node ./node-arm
+
+      - name: Release
+        uses: softprops/action-gh-release@v1
+        # if: startsWith(github.ref, 'refs/tags/')
+        with:
+          files: |
+            node-amd64
+            node-arm64
+            node-arm
+          tag_name: ${{ github.event.inputs.tag }}
+          name: ${{ github.event.inputs.name }}