Skip to content

Commit 2825598

Browse files
committed
feat: stub out all the stuff that pushes, just test the build
1 parent 87506ed commit 2825598

1 file changed

Lines changed: 17 additions & 142 deletions

File tree

.github/workflows/manual-release.yml

Lines changed: 17 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ env:
66

77
on:
88
push:
9-
tags:
10-
- v*
9+
branches:
10+
- fix/manual_release_per_platform
1111
permissions:
1212
contents: read
1313

@@ -21,14 +21,6 @@ jobs:
2121
node-version-file: '.nvmrc'
2222
- uses: ./.github/actions/verify-version
2323
id: verify-version
24-
- name: Verify tag matches version
25-
run: |
26-
VERSION=${{ steps.verify-version.outputs.version }}
27-
TAG_VERSION=${GITHUB_REF#refs/tags/v}
28-
if [ "$VERSION" != "$TAG_VERSION" ]; then
29-
echo "Error: Package version ($VERSION) does not match tag version ($TAG_VERSION)"
30-
exit 1
31-
fi
3224
- name: Determine Oclif channel
3325
id: determine-oclif-channel
3426
run: |
@@ -103,17 +95,8 @@ jobs:
10395
upload-and-promote:
10496
runs-on: ubuntu-latest
10597
needs: [check-version, build-standalone]
106-
permissions:
107-
contents: write
108-
id-token: write
10998

11099
steps:
111-
- uses: actions/checkout@v6
112-
113-
- uses: actions/setup-node@v6
114-
with:
115-
node-version-file: '.nvmrc'
116-
117100
- uses: actions/download-artifact@v4
118101
with:
119102
path: dist
@@ -123,144 +106,36 @@ jobs:
123106
mkdir final-dist
124107
find dist -name "*.tar.gz" -exec mv {} final-dist/ \;
125108
126-
- name: Create GitHub Release (draft)
109+
- name: '[STUB] Create GitHub Release (draft)'
127110
run: |
128-
gh release create v${{ needs.check-version.outputs.version }} \
129-
--title "Release v${{ needs.check-version.outputs.version }} ${{ needs.check-version.outputs.oclif_channel }}" \
130-
--generate-notes \
131-
--draft \
132-
--prerelease=${{ needs.check-version.outputs.oclif_channel != 'stable' }} \
133-
final-dist/*.tar.gz
134-
env:
135-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
echo "STUB: Would create GH release v${{ needs.check-version.outputs.version }}"
112+
ls -lh final-dist/
136113
137-
- name: Configure AWS credentials
138-
uses: aws-actions/configure-aws-credentials@v5
139-
with:
140-
role-to-assume: ${{ vars.aws_oidc_role_arn }}
141-
role-session-name: herodevs_cli_upload
142-
aws-region: ${{ vars.AWS_REGION }}
143-
144-
- name: Upload tarballs
114+
- name: '[STUB] Upload tarballs to S3'
145115
run: |
146-
npx oclif upload tarballs \
147-
--targets=linux-x64,win32-x64,darwin-arm64 \
148-
--no-xz
116+
echo "STUB: Would upload tarballs to S3 for targets linux-x64,win32-x64,darwin-arm64"
149117
150-
- name: Promote channel
118+
- name: '[STUB] Promote channel'
151119
run: |
152-
CHANNEL=${{ needs.check-version.outputs.oclif_channel }}
153-
VERSION=${{ needs.check-version.outputs.version }}
120+
echo "STUB: Would promote channel=${{ needs.check-version.outputs.oclif_channel }} version=${{ needs.check-version.outputs.version }}"
154121
155-
npx oclif promote \
156-
--channel=$CHANNEL \
157-
--version=$VERSION \
158-
--indexes \
159-
--targets=linux-x64,win32-x64,darwin-arm64
160-
161-
- name: Install jq
162-
run: sudo apt-get update && sudo apt-get install -y jq
163-
164-
- name: Verify channel pointer moved
122+
- name: '[STUB] Verify channel pointer'
165123
run: |
166-
CHANNEL=${{ needs.check-version.outputs.oclif_channel }}
167-
VERSION=${{ needs.check-version.outputs.version }}
168-
169-
echo "Verifying channel: $CHANNEL"
170-
echo "Expecting version: $VERSION"
171-
172-
MANIFEST_URL="https://end-of-life-dataset-cli-releases.s3.amazonaws.com/channels/${CHANNEL}/hd-linux-x64-buildmanifest"
173-
174-
RESOLVED_VERSION=$(curl -s $MANIFEST_URL | jq -r .version)
175-
176-
echo "Channel currently points to: $RESOLVED_VERSION"
177-
178-
if [ "$RESOLVED_VERSION" != "$VERSION" ]; then
179-
echo "Channel promotion failed."
180-
echo "Expected $VERSION but channel points to $RESOLVED_VERSION"
181-
exit 1
182-
fi
183-
184-
echo "Channel promotion verified."
124+
echo "STUB: Would verify channel pointer for ${{ needs.check-version.outputs.oclif_channel }}"
185125
186126
npm-publish:
187127
runs-on: ubuntu-latest
188128
needs: [check-version, test, upload-and-promote]
189-
permissions:
190-
id-token: write
191129
steps:
192-
- uses: actions/checkout@v6
193-
- uses: actions/setup-node@v6
194-
with:
195-
node-version-file: '.nvmrc'
196-
registry-url: 'https://registry.npmjs.org'
197-
198-
# Clean build for npm publishing
199-
- run: npm ci
200-
- run: npm run build
201-
202-
# Dry run NPM publish
203-
- name: Dry run NPM publish
204-
run: npm publish --tag ${{ needs.check-version.outputs.oclif_channel }} --provenance --access public --dry-run
205-
env:
206-
NODE_AUTH_TOKEN: ${{ secrets.HD_CLI_NPM_TOKEN }}
207-
208-
# NPM Release
209-
- name: Create NPM release
210-
run: npm publish --tag ${{ needs.check-version.outputs.oclif_channel }} --provenance --access public
211-
env:
212-
NODE_AUTH_TOKEN: ${{ secrets.HD_CLI_NPM_TOKEN }}
130+
- name: '[STUB] NPM publish'
131+
run: |
132+
echo "STUB: Would publish to npm with tag=${{ needs.check-version.outputs.oclif_channel }}"
213133
214134
publish-images:
215135
name: Publish Images
216136
needs: [npm-publish]
217137
runs-on: ubuntu-latest
218-
permissions:
219-
packages: write
220138
steps:
221-
- uses: actions/checkout@v6
222-
223-
- uses: jlumbroso/free-disk-space@main
224-
with:
225-
tool-cache: true
226-
large-packages: true
227-
haskell: false
228-
docker-images: false
229-
swap-storage: false
230-
231-
- uses: actions/setup-node@v6
232-
with:
233-
node-version-file: '.nvmrc'
234-
235-
- name: Parse tag
236-
run: echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
237-
238-
- uses: docker/metadata-action@v5
239-
id: meta
240-
with:
241-
images: |
242-
name=${{ env.IMAGE_NAME }}
243-
tags: |
244-
type=sha,format=long
245-
type=raw,value=latest
246-
type=raw,value=${{ env.VERSION }}
247-
248-
- uses: docker/login-action@v3
249-
with:
250-
registry: ghcr.io
251-
username: ${{ github.repository_owner }}
252-
password: ${{ secrets.GITHUB_TOKEN }}
253-
254-
- uses: docker/setup-buildx-action@v3
255-
- uses: docker/build-push-action@v6
256-
with:
257-
context: .
258-
file: ./ci/image.Dockerfile
259-
platforms: linux/amd64,linux/arm64
260-
push: true
261-
tags: ${{ steps.meta.outputs.tags }}
262-
labels: ${{ steps.meta.outputs.labels }}
263-
cache-from: type=gha
264-
cache-to: type=gha,mode=max
265-
build-args: |
266-
VERSION=${{ needs.check-version.outputs.version }}
139+
- name: '[STUB] Publish Docker images'
140+
run: |
141+
echo "STUB: Would build and push Docker images to ghcr.io"

0 commit comments

Comments
 (0)