diff --git a/.github/workflows/skeletor.yml b/.github/workflows/skeletor.yml new file mode 100644 index 0000000..d5cc4d1 --- /dev/null +++ b/.github/workflows/skeletor.yml @@ -0,0 +1,37 @@ +name: porter/skeletor +on: + push: + branches: + - main + tags: + - v* + pull_request: + branches: + - main +env: + PORTER_PACKAGES_REMOTE: https://github.com/getporter/test-packages.git + PORTER_RELEASE_REPOSITORY: github.com/getporter/skeletor +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 0 + - name: Install Go + uses: actions/checkout@v4 + with: + go-version-file: go.mod + cache: true + - name: Configure Agent + run: go run mage.go ConfigureAgent + - name: Test + run: mage Test + - name: Cross Compile + run: mage XBuildAll + - name: Publish + if: success() && github.event_name != 'PullRequest' + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + run: mage Publish \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index adcf6c3..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,31 +0,0 @@ -# TODO: The publish step relies on the GITHUB_TOKEN environment variable - -trigger: - branches: - include: # Only run builds for the main branch, and tagged releases such as v0.1.0 - - refs/heads/main - - refs/tags/v* - -pool: - vmImage: 'ubuntu-latest' - -steps: - - task: GoTool@0 - inputs: - version: '1.19.2' - displayName: 'Install Go' - - - script: go run mage.go ConfigureAgent - displayName: "Configure Agent" - - - script: mage Test - displayName: 'Test' - - - script: mage XBuildAll - displayName: 'Cross Compile' - - - script: mage Publish - env: - GITHUB_TOKEN: $(GITHUB_TOKEN) - displayName: 'Publish' - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))