Skip to content

Commit

Permalink
Add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Aug 8, 2023
1 parent 707e40f commit 16121b6
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
schedule:
# Run every day at 5:20
- cron: '20 5 * * *'
workflow_dispatch:

permissions:
contents: write

jobs:
release:
if: github.repository == 'fwcd/arch-repo'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Update packages
run: git submodule update --remote
- name: Commit updates
run: |
git add -A
git commit -m "Update packages ($(date -I))" || true
- name: Build packages
run: ./build-packages
- name: Publish release
if: github.ref == 'refs/heads/main'
run: |
tag="$(date -I)"
gh release create --title "$tag" "$tag" || true
gh release upload --clobber "$tag" build/*
- name: Push changes
run: git push

0 comments on commit 16121b6

Please sign in to comment.