Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil authored Jan 20, 2022
1 parent bea5171 commit 8b2e9b9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
env:
PACK_NAME: ""
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pack
run: |
if [ ! $PACK_NAME ]; then
PACK_NAME=${GITHUB_REPOSITORY##*/}
fi
echo "PACK_NAME=$PACK_NAME" >> $GITHUB_ENV
cd $PACK_NAME
zip -r ../$PACK_NAME.opk ./
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: ${{ env.PACK_NAME }}.opk
- name: Release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GH_TOKEN }}
files: ${{ env.PACK_NAME }}.opk

0 comments on commit 8b2e9b9

Please sign in to comment.