Explorar o código

workflow: update homebrew-entt (see #397)

Michele Caini %!s(int64=6) %!d(string=hai) anos
pai
achega
76f3909ec9
Modificáronse 5 ficheiros con 49 adicións e 4 borrados
  1. 3 3
      .github/workflows/build.yml
  2. 1 1
      .github/workflows/coverage.yml
  3. 42 0
      .github/workflows/deploy.yml
  4. 1 0
      CMakeLists.txt
  5. 2 0
      TODO

+ 3 - 3
.github/workflows/build.yml

@@ -14,7 +14,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v1
+    - uses: actions/checkout@v2
     - name: Compile tests
       working-directory: build
       env:
@@ -45,7 +45,7 @@ jobs:
     runs-on: ${{ matrix.os }}
 
     steps:
-    - uses: actions/checkout@v1
+    - uses: actions/checkout@v2
     - name: Compile tests
       working-directory: build
       run: |
@@ -62,7 +62,7 @@ jobs:
     runs-on: macOS-latest
 
     steps:
-    - uses: actions/checkout@v1
+    - uses: actions/checkout@v2
     - name: Compile tests
       working-directory: build
       run: |

+ 1 - 1
.github/workflows/coverage.yml

@@ -9,7 +9,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v1
+    - uses: actions/checkout@v2
     - name: Compile tests
       working-directory: build
       env:

+ 42 - 0
.github/workflows/deploy.yml

@@ -0,0 +1,42 @@
+name: deploy
+
+on:
+  release:
+    types: published
+
+jobs:
+
+  homebrew-entt:
+    timeout-minutes: 5
+    runs-on: ubuntu-latest
+
+    env:
+      GH_REPO: homebrew-entt
+      FORMULA: entt.rb
+
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        ref: 'v3.3.1'
+    - name: Clone repository
+      working-directory: build
+      env:
+        PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
+      run: |
+        git clone https://$GITHUB_ACTOR:$PERSONAL_ACCESS_TOKEN@github.com/$GITHUB_ACTOR/$GH_REPO.git
+    - name: Prepare formula
+      working-directory: build
+      run: |
+        cd $GH_REPO
+        curl "https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz" --location --fail --silent --show-error --output archive.tar.gz
+        sed -i -e '/url/s/".*"/"'$(echo "https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz" | sed -e 's/[\/&]/\\&/g')'"/' $FORMULA
+        sed -i -e '/sha256/s/".*"/"'$(openssl sha256 archive.tar.gz | cut -d " " -f 2)'"/' $FORMULA
+    - name: Update remote
+      working-directory: build
+      run: |
+        cd $GH_REPO
+        git config --local user.email "action@github.com"
+        git config --local user.name "$GITHUB_ACTOR"
+        git add $FORMULA
+        git commit -m "Update to ${{ github.ref }}"
+        git push origin master

+ 1 - 0
CMakeLists.txt

@@ -178,6 +178,7 @@ add_custom_target(
     SOURCES
         .github/workflows/build.yml
         .github/workflows/coverage.yml
+        .github/workflows/deploy.yml
         .github/FUNDING.yml
         AUTHORS
         CONTRIBUTING.md

+ 2 - 0
TODO

@@ -20,6 +20,8 @@
 Next:
 * review pool<T>::remove, ::assign
 * replace observer class with observer functions
+* workflow to update the single include file automatically
+* workflow to update the doc automatically
 
 * WIP:
  - deprecate snapshot, loader, ...