Skip to content
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

Migrate CI to Github actions #6

Merged
merged 6 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
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
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
push:
tags:
- 'v*'

name: Create Release

jobs:
build:
name: Create Release
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- First Change
- Second Change
draft: true
prerelease: false
- name: Build
run: sh scripts/package_dmg.sh
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/lock.dmg
asset_name: lock.dmg
asset_content_type: application/octet-stream
- name: Publish release
uses: StuYarrow/publish-release@v1.1.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ steps.create_release.outputs.id }}
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run Tests

on: push

jobs:
build:
name: Test
runs-on: macos-14

steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
id: cache
with:
path: ./shellcheck-latest
key: ${{ runner.os }}-shellcheck

- name: Install shellcheck
if: steps.cache.outputs.cache-hit != 'true'
run: sh ./scripts/install_shellcheck.sh

- name: Execute shellcheck
run: ./shellcheck-latest/shellcheck Lock.app/Contents/MacOS/main.command scripts/*

- name: Save to cache
if: steps.cache.outputs.cache-hit != 'true'
id: cache-save
uses: actions/cache/save@v4
with:
path: ./shellcheck-latest
key: ${{ runner.os }}-shellcheck
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ![logo](./assets/lock.iconset/icon_32x32.png) Lock.app [![Build Status](https://travis-ci.org/duksis/Lock.svg?branch=master)](https://travis-ci.org/duksis/Lock)
# ![logo](./assets/lock.iconset/icon_32x32.png) Lock.app [![Build Status](https://github.com/duksis/Lock/actions/workflows/test.yml/badge.svg)](https://github.com/duksis/Lock/actions/workflows/test.yml)

Locks your Mac

Expand Down