88 old_commit_n :
99 description : " Commit # for upstream"
1010 required : true
11+ release :
12+ description : " Wether or not to create a new release"
13+ required : true
14+ type : boolean
15+ pkg_rel :
16+ description : " Package release #"
17+ required : true
1118
1219env :
1320 OLD_COMMIT_N : ${{ github.event.inputs.old_commit_n }}
1421 NEW_COMMIT_N : ${{ github.event.inputs.new_commit_n }}
22+ I_PKG_REL : ${{ github.event.inputs.pkg_rel }}
1523
1624jobs :
1725 check :
1826 runs-on : ubuntu-latest
1927 outputs :
2028 pkg_version : ${{ steps.var.outputs.pkg_version }}
29+ pkg_rel : ${{ steps.var.outputs.pkg_rel }}
2130 steps :
2231 - name : Checkout the repo
2332 uses : actions/checkout@v3
2433
25- - name : Check last version
26- run : bash ./scripts/check-last-version.bash
27-
2834 - name : Import environment variables
2935 shell : bash
3036 run : |
@@ -36,12 +42,17 @@ jobs:
3642 id : var
3743 run : . ./scripts/set-env-vars.bash
3844
45+ - name : Check last version
46+ if : ${{ inputs.release }}
47+ run : bash ./scripts/check-last-version.bash
48+
3949 artifact :
4050 runs-on : ubuntu-latest
4151 needs : check
4252 container : mpsq/emacs-builder:latest
4353 env :
4454 PKG_VERSION : ${{ needs.check.outputs.pkg_version }}
55+ PKG_REL : ${{ needs.check.outputs.pkg_rel }}
4556 steps :
4657 - name : Checkout the repo
4758 uses : actions/checkout@v3
6576 name : emacs-manual-build
6677 path : ${{ env.USR_HOME }}/${{ needs.check.outputs.pkg_version }}.tar.gz
6778 retention-days : 5
79+
80+ - uses : ncipollo/release-action@v1
81+ if : ${{ inputs.release }}
82+ with :
83+ tag : ${{ needs.check.outputs.pkg_version }}-${{ needs.check.outputs.pkg_rel }}
84+ bodyFile : ${{ env.USR_HOME }}/body.md
85+ name : Release ${{ needs.check.outputs.pkg_version }}-${{ needs.check.outputs.pkg_rel }}
86+ artifactContentType : application/gzip
87+ artifacts : ${{ env.USR_HOME }}/${{ needs.check.outputs.pkg_version }}.tar.gz
88+ token : ${{ secrets.GITHUB_TOKEN }}
89+
90+ - name : Push to AUR
91+ if : ${{ inputs.release }}
92+ env :
93+ PRIV_KEY : ${{ secrets.PRIV_KEY }}
94+ PUB_KEY : ${{ secrets.PUB_KEY }}
95+ run : bash ./scripts/push-to-aur.bash
0 commit comments