skip TestMainSrvStart() for riscv64, #34. #83
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/release.yaml | |
name: new release | |
on: | |
push: | |
tags: | |
- "*" # triggers only if push new tag version, like `0.8.4` or else | |
env: | |
PROJECT: aprilsh | |
BIN_DIR: bin | |
permissions: | |
contents: write | |
pull-requests: write | |
# Standard GitHub-hosted runners for Public repositories | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | |
# | |
# jobs.<job_id>.strategy.matrix | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix | |
jobs: | |
change_build_info: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
outputs: | |
commit_hash: ${{ steps.commit-and-push.outputs.commit_hash }} | |
tar_version: ${{ steps.change.outputs.tar_version }} | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
# with: | |
# ref: ${{ github.head_ref }} | |
# - name: Set up Go | |
# uses: actions/setup-go@master | |
# with: | |
# go-version: 1.21 | |
- name: change build info | |
id: change | |
shell: bash | |
run: | | |
git config --global --add safe.directory /__w/aprilsh/aprilsh | |
sed -i -e "s/pkgver=.*/pkgver=`git describe --tags --abbrev=0`/g" ./build/APKBUILD | |
sed -i -e "s/.*_git_tag=.*/_git_tag=`git describe --tags`/g" ./build/APKBUILD | |
sed -i -e "s/.*_git_commit=.*/_git_commit=`git rev-parse HEAD`/g" ./build/APKBUILD | |
sed -i -e "s/.*_git_branch=.*/_git_branch=`git rev-parse --abbrev-ref HEAD`/g" ./build/APKBUILD | |
echo "tar_version=$(git describe --tags)" >> $GITHUB_OUTPUT | |
- name: commit and push changes | |
id: commit-and-push | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
branch: main | |
# - name: commit files | |
# run: | | |
# git config --local user.name "github-actions[bot]" | |
# git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
# if ! git diff --exit-code; then | |
# git add build/APKBUILD | |
# git commit -m "GH Action update files" | |
# fi | |
# | |
# - name: push changes | |
# uses: ad-m/github-push-action@master | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# force: true | |
# | |
# - name: output value | |
# id: commit-and-push | |
# run: | | |
# echo "commit_hash=$(git rev-parse HEAD)" | |
# echo "commit_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
release: | |
needs: change_build_info | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo again | |
uses: actions/checkout@master | |
with: | |
ref: ${{ needs.change_build_info.outputs.commit_hash }} | |
- name: print value | |
id: print | |
run: | | |
echo "github.ref=${{ github.ref }}" | |
echo "github.sha=${{ github.sha }}" | |
echo "commit_hash=${{ needs.change_build_info.outputs.commit_hash }}" | |
head -n 22 build/APKBUILD | |
- name: generate tar ball | |
id: vars | |
shell: bash | |
run: | | |
tar cvzf ${{ env.PROJECT }}-${{ needs.change_build_info.outputs.tar_version }}.tar.gz \ | |
--transform 's,^,${{ env.PROJECT }}-${{ needs.change_build_info.outputs.tar_version }}/,' * | |
- name: publish release assets | |
uses: softprops/action-gh-release@master | |
with: | |
generate_release_notes: true | |
target_commitish: ${{ needs.change_build_info.outputs.commit_hash }} | |
files: | | |
${{ env.PROJECT }}-*.tar.gz |