Skip to content

Commit

Permalink
build for macos and linux all archs
Browse files Browse the repository at this point in the history
  • Loading branch information
selimseker committed Sep 6, 2024
1 parent 503e000 commit ae66c36
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions .github/workflows/build_prod_exe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
strategy:
matrix:
include:
# - { runner: macos-latest, osname: macOS, arch: amd64, target: x86_64-apple-darwin, command: build }
# - { runner: macos-latest, osname: macOS, arch: arm64, target: aarch64-apple-darwin, command: build }
# - { runner: ubuntu-latest, osname: linux, arch: amd64, target: x86_64-unknown-linux-gnu, command: build }
- { runner: macos-latest, osname: macOS, arch: amd64, target: x86_64-apple-darwin, command: build }
- { runner: macos-latest, osname: macOS, arch: arm64, target: aarch64-apple-darwin, command: build }
- { runner: ubuntu-latest, osname: linux, arch: amd64, target: x86_64-unknown-linux-gnu, command: build }
- { runner: ubuntu-latest, osname: linux, arch: arm64, target: aarch64-unknown-linux-gnu, command: build, build_args: --no-default-features }
# - { runner: windows-latest, osname: windows, arch: amd64, target: x86_64-pc-windows-msvc, command: build, extension: ".exe" }
# - { runner: windows-latest, osname: windows, arch: arm64, target: aarch64-pc-windows-msvc, command: build, extension: ".exe", toolchain: nightly }
Expand Down Expand Up @@ -58,45 +58,45 @@ jobs:
path: dkn-compute-${{ matrix.osname }}-${{ matrix.arch }}.zip


# release:
# needs: build
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/compute-exe'
release:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/compute-exe'

# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# fetch-depth: 0 # Fetch all tags and history

# - name: Download Launch Artifacts
# uses: actions/download-artifact@v4
# with:
# merge-multiple: true
# path: ./artifacts

# - name: Get the latest tag
# id: get_latest_tag
# run: |
# # latest release tag
# LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "untagged")
# echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV

# # latest release name
# LATEST_RELEASE=$(curl -s \
# -H "Accept: application/vnd.github.v3+json" \
# https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.name // "no-release-found"')
# echo "LATEST_RELEASE=$LATEST_RELEASE" >> $GITHUB_ENV
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all tags and history

- name: Download Launch Artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: ./artifacts

- name: Get the latest tag
id: get_latest_tag
run: |
# latest release tag
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "untagged")
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
# latest release name
LATEST_RELEASE=$(curl -s \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.name // "no-release-found"')
echo "LATEST_RELEASE=$LATEST_RELEASE" >> $GITHUB_ENV
# echo "Latest Tag: $LATEST_TAG"
# echo "Latest Release: $LATEST_RELEASE"

# - name: Create release with artifacts
# uses: ncipollo/release-action@v1
# with:
# name: ${{ env.LATEST_RELEASE }}
# tag: ${{ env.LATEST_TAG }}
# artifacts: "artifacts/*"
# artifactContentType: application/zip
# allowUpdates: true
# # draft: true
echo "Latest Tag: $LATEST_TAG"
echo "Latest Release: $LATEST_RELEASE"
- name: Create release with artifacts
uses: ncipollo/release-action@v1
with:
name: ${{ env.LATEST_RELEASE }}
tag: ${{ env.LATEST_TAG }}
artifacts: "artifacts/*"
artifactContentType: application/zip
allowUpdates: true
# draft: true

0 comments on commit ae66c36

Please sign in to comment.