Skip to content

Commit 65c667b

Browse files
committed
Test release workflow
1 parent a86fe4c commit 65c667b

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ jobs:
3030
fail-fast: false
3131
matrix:
3232
include:
33-
- { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, image: 'ubuntu:20.04' }
3433
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, image: 'ubuntu:20.04' }
3534
- { target: aarch64-apple-darwin, os: macos-latest }
36-
- { target: x86_64-apple-darwin, os: macos-13 }
37-
- { target: x86_64-pc-windows-msvc, os: windows-latest }
3835
name: Build binaries for ${{ matrix.target }}
3936
runs-on: ${{ matrix.os }}
4037
container:
@@ -71,23 +68,17 @@ jobs:
7168
- name: Build Rust binaries
7269
run: |
7370
cargo build --locked --release --target ${{ matrix.target }} --bin datadog-static-analyzer
74-
cargo build --locked --release --target ${{ matrix.target }} --bin datadog-static-analyzer-git-hook
75-
cargo build --locked --release --target ${{ matrix.target }} --bin datadog-static-analyzer-server
7671
7772
- name: Zip Rust binaries (Unix)
7873
if: ${{ !startsWith(matrix.os, 'windows') }}
7974
run: |
8075
zip -j datadog-static-analyzer-${{ matrix.target }}.zip target/${{ matrix.target }}/release/datadog-static-analyzer
81-
zip -j datadog-static-analyzer-git-hook-${{ matrix.target }}.zip target/${{ matrix.target }}/release/datadog-static-analyzer-git-hook
82-
zip -j datadog-static-analyzer-server-${{ matrix.target }}.zip target/${{ matrix.target }}/release/datadog-static-analyzer-server
8376
8477
- name: Zip Rust binaries (Windows)
8578
if: startsWith(matrix.os, 'windows')
8679
run: |
8780
cd target\${{ matrix.target }}\release
8881
7z a datadog-static-analyzer-${{ matrix.target }}.zip datadog-static-analyzer.exe
89-
7z a datadog-static-analyzer-git-hook-${{ matrix.target }}.zip datadog-static-analyzer-git-hook.exe
90-
7z a datadog-static-analyzer-server-${{ matrix.target }}.zip datadog-static-analyzer-server.exe
9182
move *.zip ..\..\..\
9283
9384
- name: Upload assets
@@ -96,8 +87,6 @@ jobs:
9687
name: ${{ matrix.target }}
9788
path: |
9889
datadog-static-analyzer-${{ matrix.target }}.zip
99-
datadog-static-analyzer-git-hook-${{ matrix.target }}.zip
100-
datadog-static-analyzer-server-${{ matrix.target }}.zip
10190
if-no-files-found: error
10291
retention-days: 7
10392

@@ -124,15 +113,7 @@ jobs:
124113
- name: Set release variable
125114
id: set-release
126115
run: |
127-
mainCount=$(git branch -r --contains ${{ github.ref }} --format "%(refname:lstrip=3)" | grep -xc main)
128-
if [[ $mainCount -eq 0 ]]; then
129-
echo "Tag was not pushed onto main branch, exiting"
130-
exit 1
131-
elif [[ $GITHUB_REF =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
132-
echo "release=true" >> $GITHUB_OUTPUT
133-
else
134-
echo "release=false" >> $GITHUB_OUTPUT
135-
fi
116+
echo "release=false" >> $GITHUB_OUTPUT
136117
137118
- name: Download build artifacts
138119
uses: actions/download-artifact@v4
@@ -143,16 +124,6 @@ jobs:
143124
run: ls -lR
144125
working-directory: artifacts
145126

146-
- name: Create release
147-
if: ${{ steps.set-release.outputs.release == 'true' }}
148-
run: |-
149-
gh release create --generate-notes \
150-
${{ github.ref_name }} \
151-
versions.json \
152-
artifacts/*/datadog-static-analyzer*.zip
153-
env:
154-
GH_TOKEN: ${{ github.token }}
155-
156127
- name: Create pre-release
157128
if: ${{ steps.set-release.outputs.release == 'false' }}
158129
run: |-
@@ -162,13 +133,3 @@ jobs:
162133
artifacts/*/datadog-static-analyzer*.zip
163134
env:
164135
GH_TOKEN: ${{ github.token }}
165-
166-
ghcr:
167-
needs: release
168-
uses: './.github/workflows/ghcr.yml'
169-
with:
170-
release: ${{ needs.release.outputs.release == 'true' }}
171-
permissions:
172-
contents: read
173-
packages: write
174-
id-token: write

0 commit comments

Comments
 (0)