Skip to content

Commit

Permalink
Revert "ci: made changesets work with dist tag (#6739)"
Browse files Browse the repository at this point in the history
This reverts commit a243bb6.
  • Loading branch information
maiieul committed Aug 27, 2024
1 parent 0026db1 commit 25321a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ jobs:
build-insights: ${{ steps.cache-insights.outputs.cache-hit != 'true' }}
build-unit: ${{ steps.cache-unit.outputs.cache-hit != 'true' }}
build-e2e: ${{ steps.cache-e2e.outputs.cache-hit != 'true' }}
disttag: ${{ steps.set_dist_tag.outputs.disttag }}
disttag: ${{ steps.check_changesets.outputs.disttag }}

steps:
- name: Branch
run: echo "${{ github.ref }}"
- name: NPM Dist Tag from input
- name: NPM Dist Tag
run: echo "${{ github.event.inputs.disttag }}"
- name: Github event
run: echo event_name=${{ github.event_name }}

- name: Checkout
uses: actions/checkout@v4

- name: Set Dist Tag
id: set_dist_tag
- name: Check for removed .mock_changesets files and directory contents
id: check_changesets
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
is_release=false
Expand All @@ -89,14 +89,14 @@ jobs:
md_file_removed=false
for file in $removed_files; do
if [[ $file == .changesets/*.md ]]; then
if [[ $file == .mock_changesets/*.md ]]; then
md_file_removed=true
break
fi
done
if [ -d ".changesets" ]; then
md_files=$(find .changesets -name '*.md')
if [ -d ".mock_changesets" ]; then
md_files=$(find .mock_changesets -name '*.md')
if [ -z "$md_files" ] && [ "$md_file_removed" = true ]; then
is_release=true
fi
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
pnpm install --frozen-lockfile
- name: 'build: qwik'
run: pnpm build --qwik --set-dist-tag="${{ needs.changes.outputs.disttag }}"
run: pnpm build --qwik --set-dist-tag="${{ github.event.inputs.disttag }}"

- name: Print Qwik Dist Build
continue-on-error: true
Expand Down Expand Up @@ -400,7 +400,7 @@ jobs:

- name: 'build: qwik-city & others'
if: needs.changes.outputs.build-others == 'true'
run: pnpm build --tsc --api --qwikcity --cli --qwiklabs --qwikreact --eslint --set-dist-tag="${{ needs.changes.outputs.disttag }}"
run: pnpm build --tsc --api --qwikcity --cli --qwiklabs --qwikreact --eslint --set-dist-tag="${{ github.event.inputs.disttag }}"
- name: Save others cache
if: needs.changes.outputs.build-others == 'true'
uses: actions/cache/save@v4
Expand Down Expand Up @@ -874,7 +874,7 @@ jobs:

- name: Publish manually
if: github.event_name == 'workflow_dispatch'
run: pnpm build --set-dist-tag="${{ needs.changes.outputs.disttag }}" --validate --release
run: pnpm build --set-dist-tag="${{ github.event.inputs.disttag }}" --validate --release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function getVersion(distTag?: string, rootDir?: string) {
rootDir ||= resolve(__dirname, '..');
const rootPkg = await readPackageJson(rootDir);
let v = rootPkg.version;
if (!distTag || distTag === 'dev') {
if (distTag === 'dev') {
const d = new Date();
v += '-dev';
v += String(d.getUTCFullYear());
Expand Down

0 comments on commit 25321a0

Please sign in to comment.