|
| 1 | +name: publish |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + tag_name: |
| 7 | + description: 'tag name' |
| 8 | + required: true |
| 9 | + |
| 10 | +jobs: |
| 11 | + android: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + - name: Install NDK |
| 16 | + run: | |
| 17 | + cd ~ |
| 18 | + wget -O NDK -q https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip |
| 19 | + sudo apt install unzip -y |
| 20 | + unzip -q NDK |
| 21 | + ANDROID_NDK_HOME=$(pwd)/android-ndk-r15c |
| 22 | + - name: Build |
| 23 | + run: | |
| 24 | + cd build |
| 25 | + ./make_android_lua54.sh |
| 26 | + ./make_android_lua53.sh |
| 27 | + sudo apt install gcc-multilib |
| 28 | + ./make_android_luajit_arm64.sh |
| 29 | + - name: Upload |
| 30 | + uses: actions/upload-artifact@v2 |
| 31 | + with: |
| 32 | + path: ./build/plugin_lua54/**/* |
| 33 | + name: plugin_lua54 |
| 34 | + - name: Upload53 |
| 35 | + uses: actions/upload-artifact@v2 |
| 36 | + with: |
| 37 | + path: ./build/plugin_lua53/**/* |
| 38 | + name: plugin_lua53 |
| 39 | + - name: UploadJit |
| 40 | + uses: actions/upload-artifact@v2 |
| 41 | + with: |
| 42 | + path: ./build/plugin_luajit/**/* |
| 43 | + name: plugin_luajit |
| 44 | + linux: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v2 |
| 48 | + - name: Build |
| 49 | + run: | |
| 50 | + cd build |
| 51 | + ./make_linux_lua54.sh |
| 52 | + ./make_linux64_lua53.sh |
| 53 | + ./make_linux64_luajit.sh |
| 54 | + - name: Upload |
| 55 | + uses: actions/upload-artifact@v2 |
| 56 | + with: |
| 57 | + path: ./build/plugin_lua54/**/* |
| 58 | + name: plugin_lua54 |
| 59 | + - name: Upload53 |
| 60 | + uses: actions/upload-artifact@v2 |
| 61 | + with: |
| 62 | + path: ./build/plugin_lua53/**/* |
| 63 | + name: plugin_lua53 |
| 64 | + - name: UploadJit |
| 65 | + uses: actions/upload-artifact@v2 |
| 66 | + with: |
| 67 | + path: ./build/plugin_luajit/**/* |
| 68 | + name: plugin_luajit |
| 69 | + ios: |
| 70 | + runs-on: macos-latest |
| 71 | + |
| 72 | + steps: |
| 73 | + - uses: actions/checkout@v2 |
| 74 | + - name: Build |
| 75 | + run: | |
| 76 | + cd build |
| 77 | + ./make_ios_lua54.sh |
| 78 | + ./make_ios_lua53.sh |
| 79 | + ./make_ios_luajit.sh |
| 80 | + - name: Upload |
| 81 | + uses: actions/upload-artifact@v2 |
| 82 | + with: |
| 83 | + path: ./build/plugin_lua54/**/* |
| 84 | + name: plugin_lua54 |
| 85 | + - name: Upload53 |
| 86 | + uses: actions/upload-artifact@v2 |
| 87 | + with: |
| 88 | + path: ./build/plugin_lua53/**/* |
| 89 | + name: plugin_lua53 |
| 90 | + - name: UploadJit |
| 91 | + uses: actions/upload-artifact@v2 |
| 92 | + with: |
| 93 | + path: ./build/plugin_luajit/**/* |
| 94 | + name: plugin_luajit |
| 95 | + osx: |
| 96 | + runs-on: macos-10.15 |
| 97 | + |
| 98 | + steps: |
| 99 | + - uses: actions/checkout@v2 |
| 100 | + - name: Build |
| 101 | + run: | |
| 102 | + cd build |
| 103 | + ./make_osx_lua54.sh |
| 104 | + ./make_osx_lua53.sh |
| 105 | + ./make_osx_luajit.sh |
| 106 | + - name: Upload |
| 107 | + uses: actions/upload-artifact@v2 |
| 108 | + with: |
| 109 | + path: ./build/plugin_lua54/**/* |
| 110 | + name: plugin_lua54 |
| 111 | + - name: Upload53 |
| 112 | + uses: actions/upload-artifact@v2 |
| 113 | + with: |
| 114 | + path: ./build/plugin_lua53/**/* |
| 115 | + name: plugin_lua53 |
| 116 | + - name: UploadJit |
| 117 | + uses: actions/upload-artifact@v2 |
| 118 | + with: |
| 119 | + path: ./build/plugin_luajit/**/* |
| 120 | + name: plugin_luajit |
| 121 | + windows: |
| 122 | + runs-on: windows-2016 |
| 123 | + |
| 124 | + steps: |
| 125 | + - uses: actions/checkout@v2 |
| 126 | + |
| 127 | + - name: Insatll MSVC |
| 128 | + uses: microsoft/setup-msbuild@v1.0.2 |
| 129 | + |
| 130 | + - name: Build |
| 131 | + run: | |
| 132 | + cd build |
| 133 | + .\make_win_lua54.bat |
| 134 | + .\make_win32_lua53.bat |
| 135 | + .\make_win64_lua53.bat |
| 136 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 137 | + - name: Build Luajit |
| 138 | + run: | |
| 139 | + cd build |
| 140 | + .\make_win64_luajit.bat |
| 141 | + - name: Upload |
| 142 | + uses: actions/upload-artifact@v2 |
| 143 | + with: |
| 144 | + path: ./build/plugin_lua54/**/* |
| 145 | + name: plugin_lua54 |
| 146 | + - name: Upload53 |
| 147 | + uses: actions/upload-artifact@v2 |
| 148 | + with: |
| 149 | + path: ./build/plugin_lua53/**/* |
| 150 | + name: plugin_lua53 |
| 151 | + - name: UploadJit |
| 152 | + uses: actions/upload-artifact@v2 |
| 153 | + with: |
| 154 | + path: ./build/plugin_luajit/**/* |
| 155 | + name: plugin_luajit |
| 156 | + |
| 157 | + publish: |
| 158 | + runs-on: ubuntu-latest |
| 159 | + needs: [windows,osx,ios,android] |
| 160 | + steps: |
| 161 | + - uses: actions/download-artifact@v1 |
| 162 | + with: |
| 163 | + name: plugin_luajit |
| 164 | + path: plugin_luajit/ |
| 165 | + |
| 166 | + - uses: actions/download-artifact@v1 |
| 167 | + with: |
| 168 | + name: plugin_lua53 |
| 169 | + path: plugin_lua53/ |
| 170 | + |
| 171 | + - uses: actions/download-artifact@v1 |
| 172 | + with: |
| 173 | + name: plugin_lua54 |
| 174 | + path: plugin_lua54/ |
| 175 | + |
| 176 | + - name: Create Release Asset |
| 177 | + run: | |
| 178 | + cd plugin_luajit/ && tar cvfz ../luajit_${{ github.event.inputs.tag_name }}.tgz Plugins && cd - |
| 179 | + cd plugin_lua53/ && tar cvfz ../lua53_${{ github.event.inputs.tag_name }}.tgz Plugins && cd - |
| 180 | + cd plugin_lua54/ && tar cvfz ../lua54_${{ github.event.inputs.tag_name }}.tgz Plugins && cd - |
| 181 | + |
| 182 | + - name: Create Release |
| 183 | + id: create_release |
| 184 | + uses: actions/create-release@v1 |
| 185 | + env: |
| 186 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 187 | + with: |
| 188 | + tag_name: ${{ github.event.inputs.tag_name }} |
| 189 | + release_name: Tag:${{ github.event.inputs.tag_name }} |
| 190 | + draft: false |
| 191 | + prerelease: false |
| 192 | + |
| 193 | + - name: Upload luajit Plugins |
| 194 | + #id: upload-release-asset |
| 195 | + uses: actions/upload-release-asset@v1 |
| 196 | + env: |
| 197 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 198 | + with: |
| 199 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 200 | + asset_path: ./luajit_${{ github.event.inputs.tag_name }}.tgz |
| 201 | + asset_name: luajit_${{ github.event.inputs.tag_name }}.tgz |
| 202 | + asset_content_type: application/tgz |
| 203 | + |
| 204 | + - name: Upload lua53 Plugins |
| 205 | + #id: upload-release-asset |
| 206 | + uses: actions/upload-release-asset@v1 |
| 207 | + env: |
| 208 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 209 | + with: |
| 210 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 211 | + asset_path: ./lua53_${{ github.event.inputs.tag_name }}.tgz |
| 212 | + asset_name: lua53_${{ github.event.inputs.tag_name }}.tgz |
| 213 | + asset_content_type: application/tgz |
| 214 | + |
| 215 | + - name: Upload lua54 Plugins |
| 216 | + #id: upload-release-asset |
| 217 | + uses: actions/upload-release-asset@v1 |
| 218 | + env: |
| 219 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 220 | + with: |
| 221 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 222 | + asset_path: ./lua54_${{ github.event.inputs.tag_name }}.tgz |
| 223 | + asset_name: lua54_${{ github.event.inputs.tag_name }}.tgz |
| 224 | + asset_content_type: application/tgz |
0 commit comments