Skip to content

Commit

Permalink
fix: properly checkout submodule tags (#250)
Browse files Browse the repository at this point in the history
Issue #, if available:

*Description of changes:*
- #248 worked to fetch tags for the main repo, _but not submodules_.
Added new step to fetch tags for all submodules.
- Also ran a formatter since I noticed some inconsistencies in the file
 
*Testing done:*


- [x] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Justin Alvarez <[email protected]>
  • Loading branch information
pendo324 authored Feb 7, 2024
1 parent ed994e1 commit ad0fd8d
Showing 1 changed file with 39 additions and 29 deletions.
68 changes: 39 additions & 29 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Build

# Runs every Tuesday at 9 am UTC
on:

schedule:
- cron: '0 9 * * 2'
workflow_dispatch:
Expand All @@ -14,7 +13,7 @@ permissions:
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
id-token: write
contents: read # This is required for actions/checkout
contents: read # This is required for actions/checkout

jobs:
macos-arm64-build:
Expand All @@ -24,9 +23,11 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 1
fetch-tags: true
submodules: recursive
persist-credentials: false
- name: 'Fetch submodule tags'
run: |
git submodule foreach --recursive git fetch --tags
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
Expand Down Expand Up @@ -85,6 +86,9 @@ jobs:
fetch-depth: 1
submodules: recursive
persist-credentials: false
- name: 'Fetch submodule tags'
run: |
git submodule foreach --recursive git fetch --tags
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
Expand Down Expand Up @@ -126,41 +130,47 @@ jobs:
if-no-files-found: error

macos-arm64-ventura-build:
runs-on: [self-hosted, macos, arm64, 13, release]
runs-on: [self-hosted, macos, arm64, 13, release]
timeout-minutes: 60
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 1
submodules: recursive
persist-credentials: false

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.20.x

- name: Create Ventura limactl tarball
working-directory: src/lima
run: |
make clean && make exe codesign
tar cfz limactl.ventura.arm64.tar.gz -C _output/bin limactl
- name: Upload Ventura build
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: limactl.ventura.arm64
path: src/lima/limactl.ventura.arm64.tar.gz
if-no-files-found: error
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 1
submodules: recursive
persist-credentials: false
- name: 'Fetch submodule tags'
run: |
git submodule foreach --recursive git fetch --tags
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.20.x

- name: Create Ventura limactl tarball
working-directory: src/lima
run: |
make clean && make exe codesign
tar cfz limactl.ventura.arm64.tar.gz -C _output/bin limactl
- name: Upload Ventura build
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: limactl.ventura.arm64
path: src/lima/limactl.ventura.arm64.tar.gz
if-no-files-found: error

macos-x86_64-ventura-build:
runs-on: [self-hosted, macos, amd64, 13, release]
runs-on: [self-hosted, macos, amd64, 13, release]
timeout-minutes: 60
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 1
submodules: recursive
persist-credentials: false
- name: 'Fetch submodule tags'
run: |
git submodule foreach --recursive git fetch --tags
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
Expand Down Expand Up @@ -232,7 +242,7 @@ jobs:
- name: Add Ventura builds to tarballs
run: |
timestamp=${{ steps.timestamp.outputs.value }}
mkdir -p build/lima-and-qemu.macos-aarch64/bin
tar -xzf build/lima-and-qemu.macos-aarch64.tar.gz -C build/lima-and-qemu.macos-aarch64
tar -xzf build/limactl.ventura.arm64.tar.gz -C build/lima-and-qemu.macos-aarch64/bin
Expand All @@ -251,7 +261,7 @@ jobs:
name: DependenciesSourceCode.tar.gz
path: build

- name: "Upload to S3"
- name: 'Upload to S3'
run: |
timestamp=${{ steps.timestamp.outputs.value }}
Expand Down

0 comments on commit ad0fd8d

Please sign in to comment.