Add actions for builds and releases #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Gnome Focus | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install Yarn | |
run: | | |
npm install -g yarn@^1.22.0 | |
- name: Install Dependencies | |
run: | | |
yarn install | |
- name: Run build | |
run: | | |
yarn build:package | |
- name: Upload extension | |
uses: actions/upload-artifact@v4 | |
with: | |
name: [email protected] | |
path: [email protected] | |
release: | |
name: Release | |
needs: build | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download extension | |
id: download-extension | |
uses: actions/download-artifact@v4 | |
with: | |
path: gnome-focus | |
pattern: [email protected] | |
merge-multiple: true | |
- name: List Files | |
run: ls -R ${{ steps.download-extension.outputs.download-path }} | |
- uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: false | |
files: | | |
${{ steps.download-extension.outputs.download-path }}/[email protected] |