Skip to content

Commit

Permalink
simplify back make and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ale7714 committed Jan 15, 2025
1 parent b276777 commit d3c91dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/build-msi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install GitHub CLI
run: |
choco install gh --yes
# Step 3: Only needed while we provide manual versions
- name: Check for existing version
shell: bash
run: |
if gh release view | grep "agent-${{ github.event.inputs.msi_version }}.msi"; then
echo "Error: An artifact with version '${{ github.event.inputs.msi_version }}' already exists. Please increment the version."
exit 1
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
Expand All @@ -55,7 +40,7 @@ jobs:
wix build agent.wxs -define GoBinDir="${{ github.workspace }}\bin" -define MSIProductVersion="${{ github.event.inputs.msi_version }}" -ext WixToolset.Util.wixext -ext WixToolset.Firewall.wixext -o agent-${{ github.event.inputs.msi_version }}.msi
- name: Upload MSI artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: agent-${{ github.event.inputs.msi_version }}.msi
path: agent-${{ github.event.inputs.msi_version }}.msi
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ bin/viam-agent-$(PATH_VERSION)-$(LINUX_ARCH): go.* *.go */*.go */*/*.go subsyste
.PHONY: windows
windows: bin/viam-agent.exe

bin/viam-agent.exe: export GOOS=windows
bin/viam-agent.exe: export GOARCH=amd64
bin/viam-agent.exe:
go build -o $@ -trimpath -tags $(TAGS) -ldflags $(LDFLAGS) ./cmd/viam-agent
GOOS=windows GOARCH=amd64 go build -o $@ -trimpath -tags $(TAGS) -ldflags $(LDFLAGS) ./cmd/viam-agent

.PHONY: clean
clean:
Expand Down

0 comments on commit d3c91dd

Please sign in to comment.