Skip to content

Auto build a dev release with Github Actions #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build and release TabFS for Linux

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [15.x]

steps:
- uses: actions/checkout@master
with:
fetch-depth: 1

- name: Install libfuse-dev
run: sudo apt-get install libfuse-dev

- name: Compile the FUSE filesystem
run: cd fs && make

- name: Load Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Web-ext
run: npm install --global web-ext

- name: Build browser extension
run: web-ext build -s extension -n tabfs.zip

- name: Create tarball
run: tar -cvf tabfs-filesystem.tar fs/tabfs install.sh

- name: Set git commit hash
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: dev/${{ steps.vars.outputs.sha_short }}
release_name: 'Development Release #${{ steps.vars.outputs.sha_short }}'
draft: false
prerelease: true

- name: Upload filesystem asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tabfs-filesystem.tar
asset_name: tabfs-filesystem.tar
asset_content_type: application/x-tar

- name: Upload browser extension
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./web-ext-artifacts/tabfs.zip
asset_name: tabfs-web-extension.zip
asset_content_type: application/zip