Skip to content

Commit

Permalink
Fix auto-release setup (#54)
Browse files Browse the repository at this point in the history
* test_app: Try to fix release workflow

* test_app: attempted fix #2

* test_app: fix bump script

* fix release artifacts hopefully

* revert manifest changes
  • Loading branch information
robbiemc authored Dec 3, 2024
1 parent d82ac8c commit 67fae6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-test-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ jobs:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
working-directory: ./test_app
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml
cache-dependency-path: ./test_app/pnpm-lock.yaml
- name: Install dependencies
working-directory: ./test_app
run: pnpm install
Expand Down Expand Up @@ -57,4 +56,4 @@ jobs:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
artifacts: './dist/controlled-frame-test-app.swbn,./controlled-frame-test-app-update.json'
artifacts: './test_app/dist/controlled-frame-test-app.swbn,./test_app/controlled-frame-test-app-update.json'
7 changes: 4 additions & 3 deletions test_app/bump_version.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from 'fs';

const tagPrefix = 'test-app-v';
const version = process.env?.VERSION;

let version = process.env?.VERSION;
if (version) {
version = version.replace(tagPrefix, '');
} else {
Expand All @@ -24,15 +24,16 @@ let versions;

try {
versions = JSON.parse(process.env.TAGS)
.filter((tag) => tag.startsWith(tagPrefix))
.filter((tag) => tag.ref.includes(tagPrefix))
.map((tag) => {
const v = tag.ref.replace(tagPrefix, '');
const v = tag.ref.replace(`refs/tags/${tagPrefix}`, '');
return {
version: v,
src: `https://github.com/WICG/controlled-frame/releases/download/${tagPrefix}${v}/controlled-frame-test-app.swbn`,
};
});
} catch (e) {
console.error(e);
throw new Error('No tags');
}

Expand Down

0 comments on commit 67fae6e

Please sign in to comment.