Skip to content

Commit

Permalink
ci: fix malformed yml and remaining issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdmike committed Nov 15, 2024
1 parent d267020 commit 6fae42a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
Empty file added .VERSION
Empty file.
33 changes: 19 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ jobs:
go-version: ">=1.23.0"
- name: 🔬 Check semantic versioning
id: semantic-release
shell: bash
run: |
GITHUB_REF=${{ github.head_ref }}
npx semantic-release --no-ci --dry-run --plugins @semantic-release/commit-analyzer --branches ${{ github.head_ref }}
GITHUB_REF=${{ github.head_ref || github.ref_name }}
npx semantic-release@21 --no-ci --dry-run --plugins @semantic-release/commit-analyzer --branches beta
VERSION=$(cat .VERSION)
env:
GITHUB_TOKEN: ${{ secrets.ROSIE_TOKEN }}
- shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
Expand All @@ -61,15 +63,15 @@ jobs:
run: |
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/linux/console_linux_x64 ./cmd/app/main.go
- shell: bash
- shell: bash
if: matrix.os == 'windows-latest'
run: |
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/windows/console_windows_x64 ./cmd/app/main.go
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/windows/console_windows_x64.exe ./cmd/app/main.go
- shell: bash
if: matrix.os == 'macos-latest'
run: |
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/farwin/console_mac_arm64 ./cmd/app/main.go
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/darwin/console_mac_arm64 ./cmd/app/main.go
- uses: actions/cache@v4
if: matrix.os == 'ubuntu-latest'
Expand Down Expand Up @@ -101,28 +103,31 @@ jobs:
with:
egress-policy: audit

- name: Checkout Console
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

# copy the caches from prepare
- shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- uses: actions/cache@v3.2.3
- uses: actions/cache@v4
with:
path: dist/linux
key: linux-${{ env.sha_short }}
- uses: actions/cache@v3.2.3
- uses: actions/cache@v4
with:
path: dist/darwin
key: darwin-${{ env.sha_short }}
- uses: actions/cache@v3.2.3
- uses: actions/cache@v4
with:
path: dist/windows
key: windows-${{ env.sha_short }}
enableCrossOsArchive: true

- name: Checkout Console
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- run: |
ls -l dist
ls -l
- name: Check out Sample Web UI
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # master
Expand Down
4 changes: 2 additions & 2 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
{
"assets": [
{
"path": "dist/linux/console_linux_x64.tar.gz",
"path": "console_linux_x64.tar.gz",
"label": "Linux x64 Console Executable"
},
{
"path": "dist/windows/console_windows_x64.exe",
"label": "Windows x64 Console Executable"
},
{
"path": "dist/darwin/console_mac_arm64.tar.gz",
"path": "console_mac_arm64.tar.gz",
"label": "Mac arm64 Console Executable"
}
]
Expand Down

0 comments on commit 6fae42a

Please sign in to comment.