Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Mar 13, 2024
1 parent 2a901b3 commit 14f4b78
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build-binaries/linux/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ runs:
run: |
cd dist/algokit/
echo snap > ./_internal/algokit/resources/distribution-method
tar -zcf ${{ inputs.artifacts_dir }}/${{ inputs.package_name }}-snap.tar.gz *
tar -zcf ${{ inputs.artifacts_dir }}/${{ inputs.package_name }}.tar.gz *
cd ../..
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.package_name }}
path: ${{ inputs.artifacts_dir }}/${{ inputs.package_name }}-snap.tar.gz
path: ${{ inputs.artifacts_dir }}/${{ inputs.package_name }}.tar.gz
31 changes: 20 additions & 11 deletions .github/workflows/publish-release-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,6 @@ jobs:
with:
args: push --source https://push.chocolatey.org/

build-snap-binaries:
name: Build and Upload Binaries
if: ${{ github.event_name == 'workflow_dispatch' && inputs.do_snap && inputs.release != '' }}
uses: ./.github/workflows/build-binaries.yaml
with:
production_release: "true"
python_version: "3.12"
secrets: inherit

publish-snap:
runs-on: ubuntu-latest
needs: build-snap-binaries
Expand All @@ -145,11 +136,29 @@ jobs:
echo "RELEASE_VERSION=${{ inputs.release }}" >> $GITHUB_ENV
fi
- name: Configure build environment
if: ${{ github.event_name == 'workflow_dispatch' && inputs.do_snap && inputs.release != '' }}
shell: bash
run: |
artifacts_dir="${{ github.workspace }}${{ runner.os == 'Windows' && '\dist\artifacts' || '/dist/artifacts' }}"
mkdir -p $artifacts_dir
package_name="algokit${{ env.RELEASE_VERSION }}-${{ runner.os }}_${{ runner.arch }}"
echo "PACKAGE_NAME=`echo $package_name | tr '[:upper:]' '[:lower:]'`" >> $GITHUB_ENV
echo "ARTIFACTS_DIR=${artifacts_dir}" >> $GITHUB_ENV
- name: Build linux binary
if: ${{ github.event_name == 'workflow_dispatch' && inputs.do_snap && inputs.release != '' }}
uses: ./.github/actions/build-binaries/linux
with:
package_name: ${{ env.PACKAGE_NAME }}
version: ${{ env.RELEASE_VERSION }}
artifacts_dir: ${{ env.ARTIFACTS_DIR }}

- name: Download binary artifact from release
if: ${{ (env.RELEASE_VERSION != '') || (github.event_name == 'workflow_dispatch' && inputs.release != '') }}
run: |
gh release download ${{ inputs.release }} --pattern "*-snap.tar.gz" --dir dist
echo "BINARY_PATH=$(ls dist/*-snap.tar.gz)" >> $GITHUB_ENV
gh release download ${{ inputs.release }} --pattern "*-linux_x64.tar.gz" --dir dist
echo "BINARY_PATH=$(ls dist/*-linux_x64.tar.gz)" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ github.token }}

Expand Down

0 comments on commit 14f4b78

Please sign in to comment.