Skip to content

Build and publish release #14

Build and publish release

Build and publish release #14

Workflow file for this run

name: Build and publish release
on:
workflow_dispatch:
branches:
- master
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-entware:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build entware packages
run: make all
- name: Upload files
uses: actions/upload-artifact@v4
with:
name: entware
path: ./out/*.ipk
if-no-files-found: error
- name: Summary
run: |
echo '```' >> $GITHUB_STEP_SUMMARY
ls ./out >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
build-repository:
runs-on: ubuntu-22.04
needs: [build-entware]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: out
merge-multiple: true
- name: Display artifacts
run: ls ./out
- name: Build repository
run: make _repository ARCH=aarch64-3.10 BUILD_DIR=aarch64 FILENAME=blocky-keenetic_$(cat VERSION)_aarch64-3.10.ipk
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out/_pages
- name: Summary
run: |
echo '```' >> $GITHUB_STEP_SUMMARY
ls -R ./out/_pages >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
create-release:
runs-on: ubuntu-22.04
needs: [build-repository]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read version
id: version
uses: juliangruber/read-file-action@v1
with:
path: ./VERSION
trim: true
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: out
- name: Display artifacts
run: ls -R ./out
# - name: Commit and push version file
# run: |
# git config --local user.email "github-actions[bot]@users.noreply.github.com"
# git config --local user.name "github-actions[bot]"
# git add VERSION
# git commit -m "Version ${{ steps.version.outputs.content }}"
# git tag -a ${{ steps.version.outputs.content }} -m "Version ${{ steps.version.outputs.content }}"
# git push origin v${{ steps.version.outputs.content }}
# git push
- name: Create Release
id: create_release
uses: actions/create-release@v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.content }}
release_name: Release ${{ steps.version.outputs.content }}
draft: false
prerelease: false
- name: Upload Release aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/entware/blocky-keenetic_${{ steps.version.outputs.content }}_aarch64-3.10.ipk
asset_name: blocky-keenetic_${{ steps.version.outputs.content }}_aarch64-3.10.ipk
asset_content_type: application/octet-stream
- name: Summary
run: |
echo "Release ${{ steps.version.outputs.content }} created" >> $GITHUB_STEP_SUMMARY
deploy-repository:
runs-on: ubuntu-22.04
needs: [build-repository]
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Summary
run: |
echo "Repository deployed" >> $GITHUB_STEP_SUMMARY