Skip to content

Commit

Permalink
feat: migrate to FastAlfred
Browse files Browse the repository at this point in the history
  • Loading branch information
Avivbens committed Jun 2, 2024
1 parent b1de770 commit d1eee68
Show file tree
Hide file tree
Showing 16 changed files with 541 additions and 1,119 deletions.
6 changes: 6 additions & 0 deletions .fast-alfred.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* @type {import('fast-alfred').FastAlfredConfig}
*/
export default {
bundlerOptions: {},
}
36 changes: 33 additions & 3 deletions .github/workflows/release-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,44 @@ jobs:
- name: 🖥️ Setup Env
uses: ./.github/workflows/install

- name: Build
run: npm run esbuild

- name: Setup NPM
run: |
npm config -L user set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
# -------------------------
# Check next version
# -------------------------

- name: 🆚 Extract Next Release Version
id: extract-version
run: |
npx semantic-release --no-ci --dry-run --plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator > output.txt
NEXT_VERSION=$(cat output.txt \
| grep "The next release version is" \
| node -e "console.log(require('fs').readFileSync(0, 'utf-8').match(/The next release version is (\d+\.\d+\.\d+(-beta\.\d+)?)/)?.[1] ?? '')")
echo "version=$NEXT_VERSION" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

# -------------------------
# Bail out if no version
# -------------------------

- name: 🔨 Build Package
if: steps.extract-version.outputs.version != ''
run: |
# update package.json version - for packing purposes
node -e "const fs = require('fs'); \
const pkg = require('./package.json'); \
pkg.version = '${{ steps.extract-version.outputs.version }}'; \
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 4));"
npm run pack '${{ steps.extract-version.outputs.version }}'
- name: Release
if: steps.extract-version.outputs.version != ''
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_AUTHOR_NAME: github-bot
Expand Down
3 changes: 2 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"assets": [
"package.json",
"package-lock.json",
"CHANGELOG.md"
"CHANGELOG.md",
"esbuild/alfred-search-bookmark.alfredworkflow"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
Expand Down
Loading

0 comments on commit d1eee68

Please sign in to comment.